Maldives' opposition presidential candidate Ibrahim Mohamed Solih, center, shakes hands with a supporter as his running mate, Faisal Naseem, right, addresses the gathering in Male, Maldives, Monday, Sept. 24, 2018. A longtime but little-known lawmaker, Solih declared victory at his party's campaign headquarters in a contentious election widely seen as a referendum on the island nation's young democracy. (AP Photo/Eranga Jayawardena)

Maldives' opposition presidential candidate Ibrahim Mohamed Solih, center, shakes hands with a supporter as his running mate, Faisal Naseem, right, addresses the gathering in Male, Maldives, Monday, Sept. 24, 2018. A longtime but little-known lawmaker, Solih declared victory at his party's campaign headquarters in a contentious election widely seen as a referendum on the island nation's young democracy. (AP Photo/Eranga Jayawardena)

MALE, Maldives (AP) — Opposition candidate Ibrahim Mohamed Solih declared victory early Monday in the Maldives’ contentious presidential election, which was widely seen as a referendum on the island nation’s young democracy.

The win was unexpected, and Solih’s supporters flooded the streets, hugging one another, waving the Maldivian flag, cheering and honking horns in celebration. The opposition had feared the election would be rigged for strongman President Yameen Abdul Gayoom, whose first term was marked by a crackdown on political rivals, courts and the media. Yameen did not concede, and his campaign couldn’t be reached for comment.

ADVERTISEMENT

“People were not expecting this result. Despite the repressive environment, the people have spoken their minds,” said Ahmed Tholal, a former member of the Human Rights Commission of the Maldives and a project coordinator at the nonprofit watchdog Transparency Maldives.

Solih, 56, was a democracy activist during decades of autocratic rule and a former Parliament majority leader. He became the Maldivian Democratic Party’s presidential candidate after its other top figures were jailed or exiled by Yameen’s government.

Party leader and former President Mohamed Nasheed, in exile in Sri Lanka, had hoped to run again but was disqualified because of an outstanding prison sentence in the Maldives.

Famed for its sandy white beaches and luxury resorts, the nation of islands and atolls in the southern Indian Ocean has seen economic growth and longer life expectancy under Yameen, according to the World Bank. But democratic freedoms have been curtailed.

Solih campaigned door to door, promising at rallies to promote human rights and the rule of law, a message that resonated with voters who saw signs the Maldives were slipping back to autocratic rule, just a decade after achieving democracy.

“Ibu is totally different from Yameen, because Yameen is a dictator and a brutal person. Ibu is a very mild person who listens to everyone,” said Ahamed Fiasal, a 39-year-old IT business owner, using Solih’s nickname.

Still, Fiasal said, the result was surprising because “no one thought that Yameen would lose like this. He had all the power — the judiciary, the police, the security forces under him. It seemed he might rig the election even at the last minute and would win somehow or the other.”

But Solih had 58.3 percent of the vote with nearly 97.5 percent of ballots counted early Monday, according to independent news website mihaaru.com.

A spokesman for Maldives’ Election Commission said official results would not be announced until Saturday, allowing a week for parties to challenge the results in court.

Solih, surrounded by thousands of his supporters in the capital city of Male, urged calm until the commission had announced the results.

In his victory speech, Solih called the election results “a moment of happiness, hope and history,” but said that he did not think the election process had been transparent.

A police raid on Solih’s main campaign office the night before the election was seen as a worrying sign that Yameen would “muzzle his way” to re-election, according to Hamid Abdul Gafoor, an opposition spokesman and former Maldives lawmaker now based in Colombo, Sri Lanka.

The European Union had said that it was not sending election observers because the Maldives had failed to meet the basic conditions for monitoring. The U.S. had threatened to sanction Maldivian officials if the elections were not free and fair.

The State Department congratulated the people of the Maldives for having a peaceful, democratic vote. The statement from spokesperson Heather Nauert noted the reported opposition victory and urged “calm and respect for the will of the people” as the election process was being concluded.

Few foreign media organizations were allowed into the country to cover the election.

Yameen used his first term to consolidate power, jailing opponents, including his half brother, a former president, and two Supreme Court Justices.

In February, Yameen declared a state of emergency, suspended the constitution and ordered troops to storm the Supreme Court and arrest judges after they had ordered the release and retrial of those jailed after politically motivated trials.

Despite the turmoil, voters flocked to the polls on Sunday, standing in long lines in rain and high temperatures to cast ballots.

More than 260,000 of the Maldives’ 400,000 people were eligible, and voters also stood in long lines in Malaysia, the U.K., India and Sri Lanka, where the opposition had encouraged overseas Maldivians to participate.

___

Associated Press writer Krishan Francis contributed to this report from Colombo, Sri Lanka.