Saudi Arabia failed in its bid to become a member of the United Nations Human Rights Council on Tuesday as China and Russia were elected to three-year terms.

Human rights groups hailed the snub to Riyadh, which deals a blow to the kingdom’s attempts to improve its image in the international community.

“The #HRC elections today delivered a stunning rebuke to #SaudiArabia under Mohammed bin Salman,” tweeted Bruno Stagno, a deputy executive director at Human Rights Watch, referring to the country’s crown prince.

“Only country not elected, shunned by a majority of the UN. The kingdom reaped what it deserves for its serious violations of human rights and war crimes abroad,” he added.

Also read: New York mayor boycotts Saudi summit on journalist Jamal Khashoggi’s anniversary

Fifteen positions were up for grabs on the 47-seat body that has been criticized by rights organizations and the United States for electing countries accused of human rights violations.

However, only four of the 15 spots were contested — all in Asia-Pacific.

China received 139 votes in the secret ballot, a dramatic fall from the 180 votes that it received when they were last elected in 2016.

“Shows more states are disturbed by China’s abysmal rights record,” tweeted Louis Charbonneau, UN director at Human Rights Watch.

Pakistan and Uzbekistan were elected with 169 votes while Nepal was also elected with 150 votes.

Saudi Arabia was the only country up for election that failed to be elected, mustering only 90 votes.

“Unless Saudi Arabia undertakes dramatic reforms to release political prisoners, end its disastrous war in Yemen and allow its citizens meaningful political participation, it will remain a global pariah,” said Sarah Leah Whitson, executive director of Democracy for the Arab World Now, which hailed the result.

The organization she represents was founded by Saudi journalist Jamal Khashoggi, who was killed by Saudi agents at country’s Istanbul consulate two years ago.

Also read: ‘Living hell’: Ethiopians detained in Saudi call for help

Russia and Cuba were among 11 countries elected unopposed. All 193 UN members were able to vote in each region.

The controversial voting system sees countries strike bargains to agree on who will stand, often unopposed.

President Donald Trump pulled the United States out of the council in 2018.

“Today the UN General Assembly once again elected countries with abhorrent human rights records,” Secretary of State Mike Pompeo said in a statement.

He slammed the body’s membership rules, saying they “allow the election of the world’s worst human rights abusers to seats on the council.”