The United Nations has approved a plan to give family benefits to the spouses of same-sex employees if they are legally married.

Russia had led an effort to derail the plan, which was announced by U.N. Secretary General Ban Ki-moon in July. But the U.N. General Assembly budget committee voted 80-43 against Russia's proposal.

There were 37 abstentions, and 33 countries did not vote. Saudi Arabia, Pakistan, Egypt, Syria and China were among the countries that supported Russia.

Reuters reports a Saudi diplomat told the U.N. committee that the kingdom didn't support the expansion of benefits for same-sex couples because "Saudi Arabia believes these relationships are morally unacceptable."

Russia's deputy ambassador to the U.N., Petr Iliichev, criticized Ban's decision to adopt a plan that he said discriminates against many member states, according to The Associated Press. Russia has adopted laws restricting gay-rights activities.

The news agency says family benefits for U.N. staff members currently are determined by the laws of their home countries. Now the world body will recognize all same-sex marriages among its staff, regardless of nationality, although the couple has to be married in a country where it is legal.

Samantha Power, the U.S. representative to the U.N, said the Russia-led vote should never have happened. In a statement after the vote, she said Russia tried to diminish Ban's authority to make administrative decisions, and to "export to the U.N. its domestic hostility to LGBT rights," referring to lesbian, gay, bisexual and transgender communities.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.