Note to tourists: respecting the local culture when visiting a foreign country isn’t just the polite thing to do, sometimes it’s the law.

A Dutch tourist is now facing up to two years in prison after pulling the plug on a loudspeaker broadcasting a Buddhist sermon near his hotel in Myanmar, reports Channel News Asia.

On Sept. 23, Klaas Haytema was reportedly trying to sleep when he heard a loud noise being blasted into his hotel room so he went outside to uncover the source of the sound.

“I wanted to sleep desperately. I couldn’t stand the noise and checked outside the hotel,” Haytema told a court in Myanmar Monday. “I saw that children were playing. I thought that they were playing it [the prayer] and disconnected the amplifier.”

Tourist faces jail over bold move during prayers - https://t.co/sloEM4anUZ https://t.co/KCiPPTE6H1 — Myanmar Meta Guide (@meta_guide_mm) October 5, 2016

But Haytema didn’t just pull the plug on any announcement. His hotel was situated next to a religious hall and he just happened to pull the plug on a public prayer service—a crime punishable by law in the city of Mandalay.

“I did not notice that it was a religious building. I am really sorry and I really apologize,” Haytema continued.

After the plug was pulled, a mob of angry locals gathered outside the visitor’s hotel. According to the Myanmar Times, soliders were deployed to the area to protect Haytema.

But the loud noise may be least of the Dutchman’s worries. Police chief of the Maha Aung Myay township confirmed that Haytema was detained for “insulting religion” under section 295 of Myanmar's penal code. Though he has yet to be charged, the law carries a prison sentence of up two years and a monetary fine.

Myanmar is a deeply devout Buddhist society and Haytema isn’t the first foreigner to run afoul of the law.

In July a Spanish tourist was deported from Myanmar after monks complained about a tattoo of Buddha he had on his leg. In 2015, a New Zealand bar manager spent 10 months in jail for "insulting religion" by using a Buddha image to promote a cheap drink specials.