Updated

A Thai criminal court has acquitted a 41-year-old computer programmer of charges that he insulted the country's king on Facebook.

Surapak Puchaisaeng has been in jail since September 2011, when he was arrested after being accused of setting up a Facebook account that had defamatory comments about the monarch.

The court ruled Wednesday that there were flaws in the prosecutors' evidence and gave the benefit of the doubt to Surapak.

Thailand's law against defaming the monarchy, known as lese majeste, carries a penalty of up to 15 years in prison. Most of those accused are denied bail and have to spend time in jail while awaiting trial.

The law has been criticized by rights groups because they say it is easily abused for political purposes.