UNITED NATIONS (AP) — Judges from Japan, China, Germany, Slovakia and Uganda won seats Thursday on the International Court of Justice, the U.N.’s top judicial organ.

In the contested race, eight candidates were vying for five seats on 15-member world court based in The Hague, Netherlands whose job is to settle disputes between countries.

After two rounds of voting, four current members of the court — Julia Sebutinde of Uganda, Xue Hanqin of China, Yuji Iwasawa of Japan and Peter Tomka of Slovakia — were re-elected, and Germany’s Georg Nolte was elected.

Candidates from Nigeria, Rwanda and Croatia lost their bids to join the International Court of Justice.

Five judges are elected to the court every three years by majority vote in both the U.N. General Assembly and U.N. Security Council. Since the first election in 1946, the voting has been conducted by secret ballot in simultaneous meetings of the 193-member assembly and 15-member council.