BANGKOK — A Thai web designer convicted of defaming Thailand's monarchy was released from jail Friday after receiving a royal pardon from the king.

Activist and academic Suda Rangkupan said Tanyawut Taweewarodomkul was freed from Bangkok Remand Prison on Friday.

Tanyawut designed a website associated with Thailand's Red Shirt movement, which held massive street demonstrations in Thailand's capital in 2010 to protest the government in power at the time.

Tanyawut was convicted in 2010 of insulting the monarchy by posting two sets of pictures and messages that were defamatory against Thailand's King Bhumibol Adulyadej, and allowing another post containing anti-monarch comments to be posted. The court has released no details about the posts.

Thailand's law protecting the monarchy from defamation, or lese majeste, is the world's harshest. It mandates a jail term of between three to 15 years.

Tanyawut, from Nonthaburi province on Bangkok's outskirts, was sentenced to 10 years for two counts of lese majeste and another three for violating Thailand's Computer Crime Act.

The royal pardon came after he had served three years. Tanyawut's lawyers submitted a petition seeking the pardon last September.

The Red Shirts, mostly supporters of former Prime Minister Thaksin Shinawatra, called for fresh elections. Clashes between the demonstrators and security forces led to more than 90 deaths in Bangkok over nine weeks in 2010.

Thaksin was ousted in a 2006 coup and has been in self-imposed exile since being convicted in absentia on corruption charges. Prime Minister Yingluck Shinawatra, his sister, rose to power in 2011 elections.