(CNN) -- Bosnia's constitution violates European human rights law by banning Jews, Roma and other ethnic minorities from running for president or the upper chamber of Parliament, the European Court of Human Rights ruled.
Two prominent citizens of Bosnia and Herzegovina -- one Jewish, the other Roma, or Gypsy -- took the former Yugoslav republic to Europe's highest court over the provision.
Jakob Finci and Dervo Sejdic "complained that ... they were prevented by the Constitution ... and the corresponding provisions of the Election Act 2001, from being candidates for the presidency and the House of Peoples of the Parliamentary Assembly solely on the ground of their ethnic origins," the court said in its ruling.
That "amounts to discrimination and breaches their electoral rights," the court said.
A 17-judge panel found in the citizens' favor by a vote of 16-1 on the law banning them from running for president, and 14-3 on the one keeping them from becoming members of the House of Peoples.
A human rights group that worked on the case welcomed the verdict.
"By forbidding whole communities the right to participate fully in the country's political process, Bosnia's constitution and electoral law violate fundamental human rights standards," said Lucy Claridge, the head of law for Minority Rights Group International. "The European Court of Human Rights acknowledges this fact today."
It was the first time the court has found a violation under the European Convention's Protocol No. 12, which generally prohibits discrimination, the rights group said.
Bosnia and Herzegovina has a recent and bloody history of ethnic violence, suffering years of war in the early 1990s as Yugoslavia tore itself apart.
The court acknowledged that the country's constitution was designed to bring that bloodshed to an end.
The constitution created a three-member presidency, with one member from each of the country's three main ethnic groups -- Serbs, Croats and "Bosniaks," who are Muslim. The complex structure was intended to reunify two parts of the country that were at war with each other, and to keep any two factions from imposing their will on the third.
The constitution distinguishes between Bosnia's "constituent peoples" and "others" -- those who are not Serb, Croat or Bosniak.
"This system, put in place at a time when a fragile cease-fire had been accepted by all the parties to the inter-ethnic conflict that had deeply affected the country, pursued the legitimate aim of restoring peace," the court said of the arrangement negotiated in 1995.
But "the situation in Bosnia and Herzegovina (has) improved considerably since the Dayton Peace Agreement and the adoption of the Constitution," the court said.
The case is Sejdic and Finci v. Bosnia and Herzegovina (application nos. 27996/06 and 34836/06). The verdict cannot be appealed.
The 1992-95 Bosnian conflict was the longest of the wars spawned by the breakup of Yugoslavia in the early 1990s. Backed by the government of then-Yugoslav President Slobodan Milosevic, Bosnian Serb forces seized control of more than half the country and launched a campaign against the Muslim and Croat populations.
Radovan Karadzic, the leader of the Bosnian Serbs at the time, is now on trial at the International Criminal Tribunal for the former Yugoslavia, facing charges of war crimes and genocide. He was removed from power in 1995, when the Dayton Accords that ended the Bosnian war barred anyone accused of war crimes from holding office.
Milosevic died in 2006 while on trial before the tribunal.