Voters in the Maldives have thrown out the incumbent president, Abdulla Yameen, in an extraordinary rebuke to a leader who jailed political opponents and judges and drew his country closer to China during a tumultuous five-year term.

Yameen formally conceded defeat in a televised address on Monday, ending hours of apprehension in the capital, Malé, over whether the strongman would accept the decisive result or try to hang on to power.

His opponent, Ibrahim Mohamed Solih, a low-key stalwart of the democratic movement, surged to a lead in early ballots shortly after polls closed at 7pm on Sunday.

The margin grew as votes poured in from across the 26 atolls that make up the Indian Ocean state. Solih’s final tally was 38,000 votes greater than Yameen’s, according to the official count.

Yameen, who has imprisoned or exiled his main rivals on dubious charges and eroded many of the checks on his power in the past five years, said nothing about the result on Sunday evening, even as Solih claimed victory before a cheering crowd in Malé.

“This is a moment of happiness, a moment of hope, a moment of history,” Solih said. “For many of us this has been a difficult journey, a journey that has led to prison cells or exile. It’s been a journey that has ended at the ballot box. I must thank all those people who have struggled for this cause.”

The president’s office remained silent even as local monitoring groups and the country’s election commission confirmed the result, and the US and Indian governments congratulated Solih and urged a peaceful transfer of power.

On Monday, media in Malé reported the two candidates were meeting, and at about 1pm (08.00 GMT) Yameen appeared in a televised broadcast. “The citizens of the Maldives had their say yesterday,” he said. “And I accept that result.”

Yameen said he had served the Maldivian public sincerely, adding: “But the public have made a decision on my service yesterday. So I intend to accept that result and once again, to remain in their service.”

The apparent lack of interference in Sunday’s vote and promise of a peaceful transfer of power surprised opposition groups, only seven months after Yameen declared a state of emergency and imprisoned two supreme court judges and a former president, in response to what he claims was a coup attempt.

Ibrahim Mohamed Solih addresses a gathering of supporters in Malé after declaring victory. Photograph: Eranga Jayawardena/AP

The emphatic result with an 89% turnout was viewed as an endorsement of a decade-old democratic experiment in the archipelago that observers feared was on the brink of collapse.

There were calls on Monday to quash the convictions of judges and opposition leaders, including two former presidents, who have been jailed or exiled during the Yameen era.

The win also has geopolitical implications, with Solih promising to restore relations with India, the country’s traditional patron and protector, and to rely less on China, which has the wealth and willingness to fund the small country’s development.

Beijing has loaned the Maldives about $1.3bn, a debt equal to more than one-quarter of the Maldivian GDP, and which western diplomats were concerned would leave the country vulnerable to Chinese influence.

Analysts had said Yameen was in a tough contest to win a second term against an opposition of disparate parties united by the goal of removing him from office. But few were willing to predict his downfall given his control of the election commission, its supreme court and the public broadcaster.

Since his election in 2013, the former civil servant has introduced criminal defamation laws, imprisoned or exiled his key political opponents.

The US and EU had threatened sanctions against Yameen and members of his government if they were seen to be interfering in Sunday’s poll.

Monitors said a record number of people voted on Sunday, with lines snaking around the blocks of many polling booths and the voting deadline extended by three hours to accommodate the demand.

On 17 November, Solih, 54, will be sworn in as the Maldives’ fourth president since it transitioned to democracy in 2008 after decades of monarchical and authoritarian rule.

A mild-mannered stalwart of the Maldivian democratic movement, Solih was among the MPs who tried – and were denied the right – to register the country’s first independent political party in 2003. He is known for his cool temperament and is considered palatable to parties across the country’s polarised political spectrum. “It is crucial to note that as a lawmaker Ibu has enjoyed cross-party appeal more than any other,” said Azim Zahir, a Maldivian researcher based in western Australia.