Two theatre activists have each been sentenced to two-and-a-half years in prison for insulting Thailand's monarchy.

The pair were involved in producing a play called The Wolf Bride about a fictional monarch and his adviser. It was performed at Bangkok's Thammasat University in 2013 to mark the anniversary of a successful 1973 anti-dictatorship uprising led by students.

Thailand's lese majeste law is the world's harshest, carrying a punishment of three to 15 years in jail for anyone who defames, insults, or threatens the monarchy.

Anyone can file a complaint with police, and the charge has frequently been used as a weapon to harass political enemies.

In this case, a group calling itself the Royal Monarch Alert Protection Network filed the complaint.

The pair, a university student and a recent graduate who are both in their 20s, have been in jail since last August and their bail requests were repeatedly turned down by a Bangkok court. Both pleaded guilty, a common practice in lese majeste cases, in December.

Announcing the verdict, a Bangkok criminal court judge said the play contained content that insulted and defamed the monarchy and was shown in front of a large number of spectators.

The military-installed government that seized power from an elected administration in last May's coup has made defending the monarchy a priority to ensure stability toward the end of 87-year-old King Bhumibol Adulyadej's reign.