Meanwhile, the parliament session scheduled from Monday, has been postponed indefinitely citing security reasons.
The apex court order has, according to the opposition, also cancelled an earlier anti-defection ruling of 2017, thus reinstating 12 opposition MPs. Gayoom's Progressive Party of the Maldives will lose a majority in the 85-member Parliament when the ousted lawmakers return.
The beleaguered president announced Saturday that he sacked police chief Ahmed Saudhee, who was appointed just two days ago.
The main opposition Maldivian Democratic Party (MDP) said Yameen was yet to release any political prisoners. Ibrahim Hussain Shihab, a spokesman for the President's Office, said in a statement the government had questions about the ruling but would comply with it.
Hundreds of people celebrated in Male by waving the country's flag after the court overturned verdicts against ex-President Mohamed Nasheed and an ex-vice president jailed after trials that were internationally condemned.
United Nations chief calls on Maldives to respect court
Maldives President Abdulla Yameen today appeared in public for the first time since Thursday night's Supreme Court ruling, saying that he is now in talks with justices to find adequate room to enforce the ruling. Meanwhile, Mohammad Nasheed, the country's first democratically elected president, vowed on Friday to run for president after the Supreme Court quashed his conviction, dealing a major blow to the ruling regime.
India along with the UN, the US, Australia, Britain and Canada have welcomed the court's decision as "a move towards restoring democracy in the politically troubled Indian Ocean nation".
The ruling could lead to him becoming eligible to run in the presidential election expected to take place between August and November.
"I can contest and will contest", he told AFP in Colombo.
For its part, the Maldivian government said Friday that it had concerns about releasing those convicted for "terrorism, corruption, embezzlement, and treason". In 2015, in a trial widely criticized by global rights groups, Nasheed was sentenced to 13 years in prison.
The Maldives' popular image as an upmarket holiday paradise has been severely damaged by a major crackdown on dissent under Yameen, who has overseen the jailing of nearly all his political opponents.