Belarus has been defeated in a bid to join the UN's Human Rights Council, with Bosnia-Hercegovina and Slovenia being chosen to fill two vacant seats.
Belarus is among countries accused of political repression
Western countries persuaded Bosnia to stand at the last minute and then threw their weight behind its candidacy.
Human rights groups have praised the decision to shut out Belarus.
US Secretary of State Condoleezza Rice has described the country, ruled by President Alexander Lukashenko, as Europe's last dictatorship.
The campaigning group Human Rights Watch said Bosnia's win over Belarus was "an important signal to the future that abusive governments" would not be acceptable members.
Fourteen new members were elected to join the 47-member council, which aims to uphold human rights around the world.
Egypt, Angola and Qatar won seats despite opposition from human rights groups.
The vote follows the controversial election of Zimbabwe to a key UN body last week.
Zimbabwe was elected to chair the UN Commission on Sustainable Development, despite having instituted land reforms which have left the country unable to feed itself.
The Human Rights Council was established in June last year to replace the discredited Human Rights Commission.
The commission had come under criticism for including countries accused of widespread human rights abuses.
On Monday, 19 human rights groups urged the UN General Assembly to reject Egypt's candidacy, saying the government's record was "full of serious human rights violations that have been practised widely for long years".
Two human rights watchdogs - UN Watch and Freedom House - also singled out Angola, Belarus, Egypt and Qatar as "authoritarian regimes with negative UN voting records [on rights issues]... [who] are not qualified to be council members".