The European Court of Human Rights has ruled that Bosnia is violating human rights by not letting a Muslim Bosniak residing in the Serb part of the country run for president. Bosnia has three months to appeal.

The settlement ending the 1992-95 war carved the country into two regions — a Serb region and one shared by the Bosniaks and Croats. The county's presidency must consist of a Serb from the Serb region and a Bosniak and Croat from the other.

Ilijaz Pilav sued in 2007 because as a Bosniak living in the Serb region he is prevented from running for president. The court ruled in his favor on Thursday.

Such discrimination is likely to be another obstacle for Bosnia's bid to join the EU.