Brunei is defending its new anti-LGBTQ law, which makes homosexuality — as well as sodomy, adultery and rape — punishable by death by stoning. In a letter sent to the United Nations Monday it said there has been a "misconception" in international understanding of the law.

In the letter, Dato Erywan Pehin Yusof, Minister of Foreign Affairs II for Brunei, urged the international community to consider human rights in "the national context" of the country's cultural and religious values and respect the country's sovereignty.

The letter says the law, which also applies to children and foreigners, was instated the prevent LGBTQ behavior rather than punish for it. "We reaffirm that the Syariah criminal law system focuses more on prevention than punishment," he wrote. "Its aim is to educate, deter, rehabilitate and nurture rather than punish."

Get Breaking News Delivered to Your Inbox

Punishing homosexuality is not new in Brunei — it was previously punishable by up to 10 years of jail time. But now, people found guilty of gay sex can be stoned to death or whipped, in some circumstances. Death by stoning is also a new punishment for adulterers, while thieves may have their right hands or left feet amputated.

According to the letter, the laws specifically apply to Muslim values, so they will not be upheld for people of other faiths unless a non-Muslim person involves a Muslim person in the offense.

The letter also says punishment requires an "extremely high evidentiary threshold," meaning two to four men of "high moral standing" must witness the act.

Brunei's Sultan Hassanal Bolkiah (C) attends an event in Bandar Seri Begawan on April 3, 2019. Getty

On April 3, the U.N. said Brunei violated human rights by implementing the death by stoning law. Celebrities including George Clooney, Elton John and Ellen DeGeneres have voiced opposition and rallied a boycott of nine hotels in the U.S. and Europe with ties to Hassanal Bolkiah, who is the country's sultan. The United States joined the United Kingdom, Germany and France in urging Brunei to halt its plans.

"The United States strongly opposes violence, criminalization and discrimination targeting vulnerable groups, including women at risk of violence, religious and ethnic minorities, and lesbian, gay, bisexual, transgender and intersex persons," State Department deputy spokesman Robert Palladino said in a statement earlier this month.