The foreign minister of Brunei has defended his country’s new penal code — which made adultery and gay sex punishable by death from stoning, and allows for the amputation of limbs for theft — saying the laws are meant as a deterrent.

The United Nations and international rights groups have denounced the punishments, saying they amount to torture and a violation of human rights.

Erywan Yusof, Brunei’s minister of foreign affairs, in a letter sent to several United Nations rights officials this week, outlined a detailed defense and said the penalties focus “more on prevention than punishment.”

Brunei, a tiny sultanate of about 430,000 on the Southeast Asian island of Borneo, has drawn condemnation and calls for boycotts over the laws. Its leaders say the punishments are in line with the country’s culture and religious tradition.