SARAJEVO (Reuters) - Bosnia’s election authority ruled on Tuesday to fix a broken law and enable the formation of governments following the October general election, after parliament had failed to pass necessary legal changes.

Without amendments relating to the election of delegates for the upper house of Bosnia’s autonomous Bosniak-Croat Federation parliament, the region’s parliament would not be formed and could not delegate deputies to the upper house of the national parliament.

Bosnia’s complex government was devised under the Dayton peace accords which ended the country’s 1992-95 war by dividing it into two autonomous regions, the Bosniak-Croat Federation and the Serb Republic, which are linked via a weak central government.

“The conditions for smooth election of delegates and the formation of governments after general election have been created,” said Branko Petric, the president of the Central Election Commission (CIK).

The decision was hailed by the U.S. Embassy and the EU delegation in Bosnia, which for months had facilitated ethnically-charged talks among rival ethnic parties to address gaps in the law, without any results.

“We commend the CIK for taking action that will enable formation of Federation authorities,” they said in a joint statement.

But several major Sarajevo-based parties said the CIK decision, which was based on a 2013 census, violated the Federation constitution ordering that the 1991 census should be used until the process of returning war refugees is completed.

About 100,000 people were killed and two million moved from their homes during the war among Bosnian Serbs, Croats and Muslims.

The legal changes, ordered in 2016 by the Constitutional Court responding to a Croat nationalist appeal, address the number of Serbs, Croats and Bosniaks delegated to the Federation parliament’s upper house from its 10 cantons.

The Croat nationalists wanted their representatives to be elected only from the Croat-dominated cantons, in which they hold power, to avert a situation in which civic-oriented Croats from Bosniak-dominated cantons may be elected. Bosniaks disagreed.

The largest Muslim Bosniak SDA party said the CIK decision was political and that it would appeal to the Constitutional Court against it.