A United Nations resolution banning the death penalty for homosexuality was opposed by a total of 13 countries in the U.N. Human Rights Council. While several were in Africa and the Middle East, the U.S. surprisingly voted against the measure, as well.

Fortunately the resolution passed on Friday regardless, with 27 countries voting in favor of it.

It was brought forward by eight nations—Belgium, Benin, Costa Rica, France, Mexico, Moldova, Mongolia, and Switzerland—who have made global LGBT rights a priority. (Maltese Prime Minister Joseph Muscat, Costa Rican Vice President Ana Helena Chacón, and other world leaders attended a U.N. LGBT Core Group meeting earlier in the month.)

“This is a monumental moment where the international community has publicly highlighted that these horrific laws simply must end,” said Renato Sabbadini, director of The International Lesbian, Gay, Bisexual, Trans and Intersex Association (ILGA). “It is unconscionable to think that there are hundreds of millions of people living in states where somebody may be executed simply because of whom they love.”

Previous efforts by Egypt, Saudi Arabia, and Russia to block or water down the resolution failed.

AFP PHOTO/Stan HONDASTAN HONDA/AFP/Getty Images

It doesn’t just call for the end to capital punishment for homosexuality, but condemns its use “as a sanction for specific forms of conduct, such as apostasy, blasphemy, adultery and consensual same-sex relations,” and against minors, pregnant women and the mentally disabled.

The other countries who voted against the resolution were Bangladesh, Botswana, Burundi, China, Japan, Qatar, Egypt, Ethiopia, India, Iraq, the United Arab Emirates and Saudi Arabia (which currently has the death penalty for sodomy).

Not exactly good company.

In 2016, the U.N. appointed Vitit Muntarbhorn as an independent investigator to examine abuses against LGBT and intersex people around the world. Representatives from several African countries called for Muntarbhorn’s position to be suspended.