The Maldives government said Saturday that it has given permission to an imprisoned ex-president to travel to Britain for surgery.

The foreign ministry said in a statement that the permission was given on condition that Mohamed Nasheed serves the remaining years of his sentence once he returns.

Nasheed was sentenced to 13 years in prison last March for ordering the military to detain a senior judge when he was president in 2012. The move led to weeks of public protests leading to his resignation.

President Yameen Abdul Gayoom's administration drew widespread international condemnation over Nasheed's sentencing for an apparent lack of due process.

The United Nations working group on arbitrary detention has ruled Nasheed's imprisonment improper and called for his immediate release.

Nasheed's party spokesman Hamid Abdul Gaffoor said the former president has still not been officially informed of the government decision.

Nasheed became the first democratically elected president of this Indian Ocean archipelago state in 2008 ending a 30-year autocracy led by Gayoom's half-brother.

His attempt to return to office in 2013 failed when Yameen Abdul Gayoom won a disputed presidential election.