US Ambassador to the United Nations Samantha Power arrives for an informal meeting of the U.N.'s LGBT Core Group at the Stonewall Inn earlier this month.

The United Nations Human Rights Council voted Thursday to create the institution's first LGBT rights watchdog. The resolution passed in a vote of 23 to 18, with six abstentions.

The person appointed to this role will be known as an "independent expert" and the position is charged with monitoring "violence and discrimination based on sexual orientation and gender identity."

This was the most ambitious effort yet to advance LGBT rights within the U.N. system, and the resolution included the strongest language to date suggesting LGBT rights should be a concern of international human rights law.

The two previous resolutions concerning LGBT rights passed by the U.N. Human Rights Council merely called for the U.N.'s human rights office to prepare reports examining LGBT rights. But these and the few other mentions of sexual orientation or gender identity in other U.N. documents have been so modest that the U.N. Security Council made headlines by including a reference to sexual orientation in a press statement condemning the attack on a gay nightclub in Orlando, Florida — even though the document was not a formal resolution, it was notable that the U.N.'s most powerful committee had mentioned sexual orientation in any kind of declaration.

But opponents of the resolution, led by Pakistan on behalf of almost all members of the Organization for Islamic Cooperation (OIC), succeeded in adding several amendments that framed the LGBT rights proposal as a cultural imposition intending to override local values and sovereignty. Albania, which is a co-sponsor of the resolution, was the sole member of the OIC to break from the bloc.

These amendments include a handful that urge respect for local values, "religious sensitivities," and domestic politics. Another amendment suggests the resolution undermines universal human rights values to "impose concepts or notions pertaining to social matters, including private individual conduct."

An additional amendment condemned "coercive measures" to change national policies, a slap at donor nations that have adjusted international aid in response to anti-LGBT laws. The U.S. and some European governments adjusted their aid to Uganda following its adoption of a sweeping anti-LGBT law in 2014, and the World Bank also suspended a major loan in response.

One of the most surprising votes was South Africa's decision to abstain when the resolution came up for final passage. South Africa had sponsored the first LGBT rights resolution in the Human Rights Council, and for years its leadership was considered essential because it rebutted the argument that LGBT rights were being imposed by the U.S. and Europe on former colonial nations.

South Africa's representative said it could not support the resolution because the sponsors' "arrogant and confrontational" approach would divide the Human Rights Council, and claimed South Africa's path out of apartheid argues for a more collaborative approach.

"The ambassador's statement is a betrayal of the essence of South Africa's constitution," said Graeme Reid, a South African LGBT rights advocate who now heads Human Rights Watch's LGBT program. "To invoke the struggle against apartheid as justification for not supporting a resolution on violence and discrimination is both inaccurate and cynical."