A Thai man is facing up to 37 years in prison after he insulted the king's dog on social media.

The New York Times reports factory worker Thanakorn Siripaiboon was arrested at his home in Bangkok last week. He is being accused of writing a "sarcastic" online post about King Bhumibol Adulyadej's prized pet, Tongdaeng, in addition to other insults aimed at the monarchy.

The country's military did not disclose the exact insult the suspect said.

According to Thanakorn's lawyer, Anon Numpa, the charges come as a result of increasingly strict laws against "lèse-majesté," or "royal insults."

Thailand law forbids anyone from defaming the king, queen, heir apparent, or regent, but the rules have since expanded to include other members of royalty.

"I never imagined they would use the law for the royal dog," said Anon. "It's nonsense."

Last year, a scholar was accused of insulting a king who lived over 400 years ago. Two students in their 20s also faced charges of up to 15 years for staging a play about a fictitious king, Time reports.

Even American ambassador Glyn T. Davies has found himself under investigation for allegedly criticizing the lengthy prison sentences given on lèse-majesté charges.

The ailing King Bhumibol Adulyadej, 88, is a popular figure in Thailand, as is his dog Tongdaeng. The king rescued the mongrel from an alley in 1998.

In 2002, the King published a book about the beloved dog. It became a best-seller, and eventually led way to an animated film, which currently sits at the No. 2 spot on the Thai box office.

The Thai military, which seized control of the country last year, has since cracked down on any forms of protest or challenge to its power. Journalists, academics, students and politicians found in opposition to the monarchy have been detained and sent to military camps for "attitude adjustment."

Criticism by the United Nations and various human rights organizations have been largely ignored by the Thai government.