(CNN) -- A former political prisoner unseated Maldives longest-serving president in the island nation's first multi-party elections, according to the tiny Muslim nation's Election Commission.
Mohamed Nasheed, right, shakes hands with supporters after he emerged winner of the presidential election.
Mohamed Nasheed of the opposition Maldivian Democratic Party won 54 percent of the votes to President Maumoon Abdul Gayoom's 46 percent, the commission reported Wednesday. Nearly 180,000 voters turned out.
Nasheed, among Gayoom's fiercest critics, has been arrested as a journalist several times over the past 15 years and held as a political prisoner in Maldives.
Gayoom, 71, who had won six previous elections as the only candidate on the ballot, ended up in a runoff with Nasheed after failing to clinch the seat in the October 9 election.
It was a referendum on Gayoom, who came to power in 1978 and has ruled the nation for 30 years. Five candidates challenged Gayoom for the presidency.
Many Maldivians consider the 71-year-old Gayoom a hero who has transformed a fishing culture into a tourist nation whose white sandy beaches lure well-heeled Western tourists.
Nasheed was among Gayoom's fiercest critics, contending that the president has ruled with an iron fist, crushing dissent, amassing wealth and stacking his administration with friends and relatives.
Gayoom had sought a seventh five-year term, saying that he would need a few more years to see through the reforms he has put in place.