Nasheed was jailed for 13 years earlier this year on terror charges

COLOMBO (AFP) - A United Nations panel has ruled that the jailing of former Maldives president Mohamed Nasheed was illegal and called for his immediate release, the government of the atoll nation said Thursday as it rejected the ruling.

The government said it had received a copy of the UN Working Group on Arbitrary Detention (WGAD) ruling, which has not yet been made public, and which follows a complaint by the country s first democratically elected leader.

"The opinion of the WGAD is that the complaint submitted by the former president Nasheed ought to be upheld," the government said in a statement.

"The government... does not accept the decision of the WGAD and will not be made to act on the basis of a non-binding opinion."

Nasheed was jailed for 13 years earlier this year on terror charges related to the arrest of an allegedly corrupt judge when he was still president in 2012.

The UN has said his trial was seriously flawed, and his 13-year jail sentence was commuted to house arrest in July.

But last month police took him back to prison, in a surprise move that drew fresh criticism from the UN and the United States.

Last month his London-based barrister Amal Clooney and Washington-based lawyer Jared Genser travelled to the Maldives to press for his release.

"Today, with WGAD decision, the question has changed from if Nasheed will be freed to when -- huge step forward to mobilising global action," tweeted Genser on Thursday.

Faced with mounting international pressure, Maldivian authorities have tried to distance themselves from the controversial judgement, saying that the state will take the unusual step of appealing his conviction.

It has hired another high-profile London barrister Cherie Booth, as its representative.

The nation of 1,192 tiny coral islands scattered across the equator depends on upmarket tourism. However, its image has suffered in recent years due to prolonged political unrest.

Nasheed was the country s first democratically elected leader. He ruled from 2008 to February 2012, when he was forced to resign following a mutiny by police and troops.