Preliminary election results in Bosnia suggest the country is split along ethnic lines, with Muslims favouring unification and Serbs division.
Early election results suggested nationalists had done well
Haris Silajdzic, who has called for Bosnia's Serbian enclave to be folded into the rest of the country, looks as if he has secured the Muslim vote.
However, Serbs elected nationalist Nebojsa Radmanovic, whose party has called for a referendum on secession.
International supervision of the country is due to end next year.
But the international community, which has largely run the country since the end of its war in the early 1990s, says Bosnia's constitution needs to be amended before the handover can take place.
Mr Silajdzic wants to unify Bosnia's two largely autonomous regions - the Muslim-Croat federation and the Serb Republic (Republika Srpska).
This might pave the way to eventual membership of the EU, his supporters hope.
Reform at risk
Bosnia's political structure remains divided along ethnic lines, with a rotating presidency comprising a Muslim, a Serb and a Croat.
With 40% of the votes counted, Mr Silajdzic had polled 38% of the Muslim vote, against 18% for his nearest rival, the election commission said.
The Croat vote was still too close to call, with incumbent Ivo Miro Jovic of the Croatian Democratic Union only marginally ahead of Zeljko Komsic of the opposition multi-ethnic Social Democratic Party.
But the vote in Republika Srpska looked clear cut, with Nebojsa Radmanovic having secured 56% of the votes so far.
Mr Radmanovic belongs to the Alliance of Independent Social Democrats, which has called for the continued division of Bosnia, and even a referendum on outright independence.
The BBC's Nicholas Walton in Sarajevo says it looks like a large majority of Serbs agree on this policy, and that there could therefore be real trouble ahead on the issue of constitutional reform.
Voters also cast ballots for regional, as well as national assemblies, in a complicated system that was set up to represent the interest of all groups after the 1992-95 Bosnian war.
Despite poverty and high unemployment, issues of ethnicity and nationalism have dominated the election campaigns, says our correspondent.