Current President Yameen Abdul Gayoom had been set to run for re-election virtually unopposed, with all of his opponents either jailed or exiled. But ex-President Mohammed Nasheed, who is among the prisoners ordered freed, said he would challenge Yameen, who has rolled back many democratic reforms since coming to power five years ago.
"I can contest and I will contest and hopefully we will win it again," Nasheed told the AP in Colombo, the capital of neighbouring Sri Lanka.
Nasheed also called for reforms in the country's security services, telling the AP that "a small element within the military and police want to prop up the dictatorship" of Yameen.
Male, the capital, was quiet today afternoon, although an opposition leader said Yameen's opponents were planning further protests.
More From This Section
The last night's court ruling ordered the release of nine political dissidents, saying their guilty verdicts had been influenced by politics. It also ordered new trials for all nine. It was not immediately clear how retrials would affect the upcoming elections, but the opposition alliance welcomed the ruling in a statement, saying it "effectively ends President Yameen's authoritarian rule."
Attorney General Mohamed Anil said Police Chief Ahmed Areef was fired after the president was repeatedly unable to reach him on the telephone. Yameen named Areef's deputy, Ahmed Saudhee, as interim chief.
The clashes lasted about three hours, with police dispersing rock-throwing crowds using pepper spray and batons. At least one injured police officer was taken to a hospital. It was not immediately clear if anyone was arrested, though some protesters were taken away by police.
An archipelago known for its luxury tourist resorts, the Maldives became a multi party democracy 10 years ago after decades of autocratic rule by the current president's half brother, strongman Maumoon Abdul Gayoom. But the nation lost much of its democratic gains after Yameen was elected in 2013.
He has maintained a tight grip on power, controlling institutions such as the judiciary, police and the bureaucracy. The half brothers have since fallen out, and the former leader has joined the opposition.
The government said in a statement it was trying to "vet and clarify" the court's ruling and "will work to engage, and consult with, the Supreme Court in order to comply with the ruling in line with proper procedure and the rule of law."
In 2015 Nasheed was sentenced to 13 years in prison, convicted of terrorism charges in a trial widely condemned by international rights groups.
Adeeb was sentenced to 33 years in prison in 2016, charged with corruption, possession of illegal firearms and planning to kill Yameen by triggering an explosion on his speedboat. However, FBI investigators said they found no evidence of a bomb blast.