Thailand has blocked access to online petition site Change.org, after it hosted a petition calling for King Maha Vajiralongkorn to be declared persona non grata in Germany.
The Ministry of Digital Economy and Society said the petition's contents violated Thailand's Computer Crime Act.
King Vajiralongkorn has been criticised by protesters for spending much of his time in Germany.
The petition attracted nearly 130,000 signatures before the site was blocked.
It comes as Thailand is seeing some of its biggest pro-democracy protests in years.
Protesters are demanding amendments to the constitution, a new election and the resignation of Prime Minister Prayuth Chan-ocha.
They are also calling for curbs on the king's power, in a country where criticism of the monarchy is punishable by long prison sentences.
Thailand's biggest challenge
The petition - written in Thai, English and German - was originated by a Thai graduate student in France, according to BBC Thai.
In it, he called for Germany to declare the king persona non grata and disallow him from continuing "any further residence in Germany".
It attracted almost 130,000 signatures before the site was blocked in Thailand, with an online notice saying that the content had been suspended for breaking the Computer-related Crime Act 2007 and or/ the Gambling Act 1935.
The petition, which is still available outside Thailand, comes after Germany's foreign minister said that King Vajiralongkorn should not be engaging in politics from inside Germany.
Speaking in response to a question by an opposition MP, he added that "if there are guests in our country that conduct state business from our soil, we would always want to counteract that".
King Vajiralongkorn ascended to the Thai throne in 2016, but is known to spend much of his time in Bavaria.
He is currently on a visit to Thailand.
On Thursday, tens of thousands of protesters gathered in the capital Bangkok, despite a government decree banning demonstrations. A day earlier, protesters had jeered and held up their trademark three-finger salute as a motorcade passed carrying the queen through Bangkok.
This emergency decree has now been extended to a month, say local media reports.
The protests were triggered earlier this year after a popular opposition political party was ordered to dissolve. The movement has since become the biggest challenge in years to Thailand's establishment.