The Supreme Court of Maldives has allowed the appeal for overturning the prison sentence of ex-president Mohamed Nasheed to be heard in the court.

The Prosecutor General's office said the appeal was approved after a preliminary hearing was held on Wednesday.

The ex-President had been sentenced to 13 years of jail time in March 2015.  A UN panel had said that the jail time sentence given to Nasheed wwas unwarranted. It then appealed to the government to overturn the ex-President's sentence.

The UN Working Group on Arbitrary Detention had ruled that the prison sentence is unlawful and asked for his immediate release.

Maldives Foreign Minister Dhunya Maumoon said: "I'm confident that the Supreme Court will take into account the opinion of the UN working group before issuing its verdict. This is an issue related to the judiciary. There's nothing the government can do."

The high court had earlier rejected the appeal on the grounds that Nasheed himself did not file the plea. Nasheed's lawyers were reported as saying by Haveeru that they were not informed about the preliminary hearing and the hearing was probably held with state prosecutors.

Mohamed Nasheed, the first democratically chosen president, was removed from office in 2012 i what supporters believe was a coup, reported The Guardian.

Earlier this month, the Maldives President Abdulla Yameen, imposed a 30-day emergency fearing pro-Nasheed rallies, giving security forces power to arrest suspects, reported Asia Times.