The strongman leader of the Maldives on Monday conceded defeat in the presidential election, easing fears of a fresh political crisis in the archipelago at the centre of a battle for influence between India and China.
"The Maldivian people have decided what they want. I have accepted the results from yesterday," President Abdulla Yameen said in a televised address to the Indian Ocean nation a day after the joint opposition candidate unexpectedly triumphed.
"Earlier today, I met with Ibrahim Mohamed Solih, who the Maldivian electorate has chosen to be their next president. I have congratulated him," Yameen said.
He said he would hand over power when his term ends on November 17 and ensure a smooth transition in the 1,200-island nation, popular with foreign tourists for its white sands and blue lagoons.
Solih's victory was a major surprise, with Yameen's main political rivals either in prison or in exile, media coverage of the opposition sparse and monitors and the opposition predicting vote-rigging.
There had been concerns Yameen might not accept the result given what happened after the last election in 2013.
The Supreme Court annulled that result after Yameen trailed former president Mohamed Nasheed -- giving Yameen time to forge alliances and win a second round of voting that was postponed twice.
Results released by the electoral commission showed Yameen on 41.7 percent of the vote, well behind Solih on 58.3 percent -- the only other name on ballot papers.
The final official result will take up to a week to be published.
Yameen stayed quiet overnight after the outcome became clear. But signs grew Monday that he would throw in the towel, with a foreign ministry statement saying Solih had won and state media showing him claiming victory.
Nearly 90 percent of the 262,000 electorate turned out to vote, with some waiting in line for more than five hours.
Celebrations broke out across the archipelago on Sunday night, with opposition supporters waving yellow flags of Solih's Maldivian Democratic Party (MDP) and dancing in the streets.
On Monday the situation was calm.
The US State Department, which had warned of "appropriate measures" if the vote was not free and fair, had called on Yameen to "respect the will of the people".
Regional superpower India said the result marked "the triumph of democratic forces". But China was yet to comment, with Monday being a public holiday there.
Beijing loaned Yameen's government hundreds of millions of dollars for infrastructure projects like the new "China-Maldives Friendship Bridge" from the airport to the capital Male, which opened in August.
The loans stoked fears among Western countries and India about China's growing influence under its "Belt and Road Initiative" stretching from Asia into Africa and Europe.
- Prisoners released -
Solih had the backing of a united opposition trying to oust Yameen but struggled for visibility, with local media fearful of falling foul of heavy-handed decrees and reporting restrictions.
In February Yameen imposed a 45-day state of emergency, alarming the international community, in what was seen as an attempt to block a push by his opponents in parliament to impeach him.
A crackdown saw former president Maumoon Abdul Gayoom -- the country's longest-serving leader and Yameen's half-brother -- jailed along with the Chief Justice and another Supreme Court justice.
Gayoom was among several inmates brought to Male to lodge appeals against their sentences on Monday, after Solih used his victory speech the previous day to call for the release of dissidents incarcerated by Yameen.
The High Court is expected to hear their cases on Tuesday.
Five other political prisoners detained after the crackdown, including opposition lawmaker and former police chief Abdulla Riyaz, were ordered released.
Independent international monitors were barred from Sunday's election and only a handful of foreign media were allowed in to cover the poll.
The government had used "vaguely worded laws to silence dissent and to intimidate and imprison critics", some of whom had been assaulted and even murdered, according to Human Rights Watch.
The country's new leader pledged on Twitter before the election that he would open investigations into the disappearance of journalist Ahmed Rilwan, missing since 2014, and the fatal stabbing of blogger Yameen Rasheed in 2017.
He promised also to repeal anti-defamation legislation and "ensure press freedom".