Back when he was a mild-mannered civil servant, few in the Maldives predicted Abdulla Yameen would one day run the country, let alone with an iron grip, locking up judges, his rivals and even his 80-year-old half-brother.
Now, five years after skillfully manoeuvering his way to the top, the 59-year-old is on the cusp of being elected on Sunday to a second five-year term running the Indian Ocean archipelago beloved of foreign tourists.
All of his main rivals are either behind bars or in exile, local media are scared to be critical -- and even to report on the opposition -- and the electoral system has been rigged, his opponents claim.
Adding to the alarm of the United States, the European Union and regional heavyweight India, Yameen has also cosied up to China, using cheap credit from Beijing for a blitz of infrastructure building.
"When I was first sworn into office, our nation was in disarray. The state institutions were in chaos, and the institutions were... on the brink of collapse," Yameen said in a recent address to the nation.
Now though after five years, he had restored "stability and economic prosperity" to the nation of 340,000 people and more than 1,000 coral islands, he said.
- Family business -
Until 10 years ago, Yameen was just the half-brother of Maumoon Abdul Gayoom, president from 1978 until 2008.
After working as a surveyor, Yameen got his first taste of government under Gayoom, serving in his cabinet as a trade minister and as employment minister.
But Gayoom was defeated at the country's first democratic election in 2008 and his young challenger Mohamed Nasheed became a reformist president.
However, Nasheed stepped down in 2012 after protests that he said were instigated by Gayoom.
Yameen stood in elections the following year, in which Nasheed won the first round, but the Supreme Court annulled the result.
A subsequent vote was then twice delayed, allowing Yameen time to forge alliances that helped him narrowly win a contested run-off.
When he was inaugurated, diplomats in nearby Sri Lanka thought Yameen would end up being a puppet of Gayoom, but the new president soon showed that he was his own man.
Early evidence that he meant business came in September 2015 when after an alleged assassination attempt involving a blast on his yacht, Yameen had his deputy Ahmed Adeeb jailed.
Then in February this year, Yameen showed how ruthless he could be when the Supreme Court moved to overturn convictions of his rivals, setting up a possible impeachment by his opponents in parliament.
Yameen hit back by declaring a state of emergency, suspending the constitution, arresting the Chief Justice and another judge of the Supreme Court and sending troops to take over parliament.
His aged half-brother Gayoom was jailed for allegedly conspiring with the Supreme Court to topple him.
The crackdown was condemned by the US and the EU, and described by the UN human rights chief as "an all-out assault on democracy".
- 'Holding a fish' -
Undeterred, Yameen had consistently ignored international pressure.
"It is... important that friends and partners in the international community, including India, refrain from any actions that could hinder resolving the situation facing the country," the foreign ministry said in a statement after the state of emergency was imposed.
The man who would have been Yameen's main rival in Sunday's election, former president Nasheed, is living in exile after being sentenced to 13 years in prison for a terrorism conviction which the UN says was politically motivated.
"Yameen is a very clever manipulator and a very intelligent person, but unfortunately he has a criminal mind," said Ahmed Naseem, a former foreign minister and opposition activist.
"He is not a charismatic popular figure. Even when he tries to carry a baby, it looks like he is holding a fish."