The office of the U.N. High Commissioner for Human Rights says it is appalled at the long prison sentences given to people convicted in Thailand of insulting the monarchy, and is calling for the immediate release of all people jailed for exercising freedom of expression.

Its statement, released in Geneva, comes just four days after Thai military courts in separate cases gave prison sentences of 30 and 28 years, respectively, to a man and a woman for posting messages on Facebook found to have violated the lese majeste law.

Spokeswoman Ravina Shamdasani said the U.N. agency is urging the Thai government to amend the law to meet international human rights standards, declaring that it should not be used to smother public debate.