Venezuela won a seat on the UN Human Rights Council on Thursday, months after its government was accused of executing thousands of political opponents.
The Latin American oil giant's successful bid brought criticism from the US, neighbouring countries and Human Rights Watch. The US is seeking to remove President Nicolas Maduro's regime.
But to applause in the 193-member UN General Assembly, Venezuela was among 14 new members admitted to the 47-member council based in Geneva.
The council promotes and protects human rights around the world. Its members are elected for staggered three-year terms on a regional group basis.
Two of eight seats allotted for Latin America were available and Brazil took one after winning the most votes.
This month Costa Rica entered the running with the specific goal of denying Venezuela a seat, but it lost out. Brazil won 153 votes, Venezuela 105 and Costa Rica 96.
The Maduro regime has jailed opposition leaders and is accused of using torture and arbitrary arrests as it struggles to hold on to power amid a collapsing economy.
The UN High Commissioner for Human Rights, Michelle Bachelet, reported in July that over the previous 18 months there had been nearly 7,000 extrajudicial executions, and that Venezuelan security forces were responsible for most.
More than 50 countries have switched their recognition to national assembly speaker Juan Guaido, calling him the country's legitimate acting president.
But Mr Maduro still has strong support at the UN, from Russia and China in particular.
In Caracas, Attorney General Tarek William Saab hailed the vote as a "major achievement" and announced the release of 24 detained opposition figures.
But US ambassador to the UN Kelly Craft criticised the appointment as “unconscionable”.
“I won’t stand for it and neither should the UN,” Ms Craft tweeted.
"I am personally aggrieved that 105 countries voted in favour of this affront to human life and dignity," she said later.
"It provides ironclad proof that the Human Rights Council is broken and reinforces why the United States withdrew.
"That one of the world’s worst human-rights abusers would be granted a seat on a body that is supposed to defend human rights is utterly appalling.
Human Rights Watch condemned Thursday's vote as a slap in the face to the people of Venezuela and the international community.
"It is discouraging to see a cynical candidacy mar the credibility of the UN Human Rights Council," said Philippe Bolopion of the group, which had campaigned against the Venezuelan bid.