The political crisis in the Maldives has deepened as the government of the island nation said it would not obey a supreme court order to free a group of imprisoned opposition leaders.

The surprise judicial ruling last week has led to an increasingly tense stand-off between the supreme court and the government of President Yameen Abdul Gayoom.

Protests have spilled into the streets of the capital, Male, and soldiers in riot gear have been deployed to the parliament building to stop MPs from meeting.

Legal affairs minister Azima Shakoor said “the government does not believe that the supreme court ruling to release the political prisoners can be enforced”.

Guilty verdicts against several people, including former president Mohamed Nasheed, were found to have been politically influenced (AP)

She explained the decision by saying that the supreme court had not acted on a series of government letters, saying there were “numerous challenges” to implementing the ruling.

On Sunday, a supreme court statement said that “there are no obstacles in implementing the ruling and releasing political prisoners and that this has been informed to the Prosecutor General’s office”.

There was no immediate comment from Mr Yameen’s main rival, exiled former president Mohammed Nasheed, who is among the prisoners ordered freed.

The supreme court ruled that the political leaders’ guilty verdicts had been politically influenced. The ruling has led to protests by opposition supporters urging the government to obey the order.

The United Nations and several foreign governments, including that of the US, have urged the Maldives to respect the court order.

Mr Nasheed has been living in exile in the UK since 2016 after being granted asylum when he travelled there on medical leave from prison.

Protesters have gathered in the capital (AP)

In addition to ordering the release of the political prisoners, the court also reinstated 12 MPs who had been ousted for switching allegiance to the opposition. When those MPs return, Mr Yameen’s Progressive Party of the Maldives will lose its majority in the 85-member parliament, which could result in the legislative body functioning as a rival power to the president.

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, Maumoon Abdul Gayoom.

But the nation lost much of its democratic gains after Mr Yameen, who has maintained a tight grip on power, was elected in 2013. He had been set to run for re-election this year virtually unopposed, with all of his opponents either jailed or exiled.

On Friday, Mr Nasheed said he would mount a fresh challenge for the presidency this year. He was sentenced to 13 years in prison after he was convicted under the Maldives’ anti-terror laws. That trial had been widely condemned by international rights groups.