"We thought we would win," said Ahmed Nihan, leader of the ruling Progressive Party of the Maldives' parliamentary group. "We thought people would vote for us, after they saw with their own eyes the development President Yameen brought to this country ... But the relentless accusations of theft cost us the election."
Faced with widespread criticism, Yameen pushed through a draconian law on defamation and imposed more than $250,000 in fines on opposition-aligned Raajje TV, the most popular television station in the country. He also pulled the Maldives out of the Commonwealth after threats of action, and moved closer to China and Saudi Arabia over traditional allies, India and the United Kingdom.
It was Beijing that funded Yameen's infrastructure boom, a move that has pulled the Maldives into what the opposition said was a "debt-trap".
The crackdown united the four opposition political parties, who fielded a long-time member of parliament against Yameen. Solih, the opposition candidate, promised to restore democracy, release dissidents and investigate corruption allegations against Yameen. In the run up to Sunday's vote, Solih said he was worried it would be rigged, but said he was sure voters would turn out in large numbers to say "no" to Yameen.
With so much hanging in the balance, why did the president contest an election that he might lose?
Niyaz Ibrahim, a former auditor general who lost his job after he flagged corruption in tourism leases, said Yameen was "convinced he could win".
"He was fooled by his allies. They organised massive rallies, by intimidating and forcing government employees to attend," Ibrahim said from Sri Lanka's Colombo, where he lives in exile.
"And that's why he didn't expect such a huge defeat."