Last night court ruling ordered the release of the politicians, including exiled ex-President Mohamed Nasheed, saying their guilty verdicts had been influenced by the government.
Hundreds of people celebrated in Male, the Indian Ocean archipelago's capital, by waving the country's flag, but police dispersed the crowds using pepper spray and batons.
Rocks were thrown at police and at least one injured officer was seen being carried to a hospital.
The ruling could allow Nasheed, the nation's first democratically elected president, to challenge President Yameen Abdul Gayoom when he seeks re-election later this year.
"I urge the government and security services to respect this ruling, which bolsters democracy and rule of law for all Maldivians," he wrote on Twitter.
An archipelago known for its luxury tourist resorts, Maldives became a multiparty democracy 10 years ago after decades of autocratic rule. But it lost much of its democratic gains after Gayoom was elected in 2013.
He has maintained a tight grip on power, controlling institutions like the judiciary, police and the bureaucracy.
The court also reinstated 12 lawmakers who had been ousted for switching allegiance to the opposition. When those lawmakers return, Gayoom's Progressive Party of the Maldives will lose a majority in the 85-member Parliament.
The opposition alliance in a statement welcomed the ruling and called for Gayoom's resignation, saying the court's decision "effectively ends President Yameen's authoritarian rule."
Nasheed had been sentenced to 13 years in prison on terrorism charges but was allowed to get medical treatment in Britain, where he received asylum.
The ruling could lead to him becoming eligible to run in the presidential election expected to take place between August and November.
Gayoom had been set to run for re-election virtually unopposed with all of his opponents either jailed or exiled. Also named for release was Gayoom's former deputy Ahmed Adeeb, who had been jailed on accusations of plotting to kill Gayoom.
In 2016, Adeeb was sentenced to 33 years in prison for alleged corruption, possession of illegal firearms and planning to kill Gayoom by triggering an explosion on his speedboat. However, FBI investigators said they found no evidence of a bomb blast.
Disclaimer: No Business Standard Journalist was involved in creation of this content
