Ehud Barak, a former Israeli prime minister, is to face a former intelligence chief in runoff elections for the leadership of Israel's Labour party.
Results on Tuesday showed Barak had edged out Ami Ayalon, a former chief of Shin Bet, 36 per cent to 31 per cent, with Amir Peretz, the ousted Labour leader, coming third with 22 per cent.
But Barak fell short of the 40 per cent needed for an outright victory, setting the stage for a June 12 runoff with Ayalon.
Meanwhile, Peretz, Israel's defence minister, has seen his popularity ratings drop to single digits after he a government inquiry blasted him over last year's Lebanon war.
Both Barak and Ayalon have warned that they will pull Labour out of Olmert's coalition unless the prime minister steps down because of the scathing inquiry into his handling of last year's war in Lebanon.
Ayalon has vowed to do so immediately while Barak has said he would serve in Olmert's government as defence minister until early elections are held.
If Labour and its 19 ministers leave, Olmert's coalition will have the support of just 59 MPs, two short of a majority in the 120-seat parliament.
A senior Ayalon aide said: "Ayalon believes conditions are ripe for a change in government. There is enough support in Kadima to change its leader and then we could form a new government," he said.
Yossi Alpher, an Israeli commentator, said: "One way or another, it means in about a year there will be early elections."
Barak spent nearly six years in a political wilderness after he was beaten by Ariel Sharon, also a former prime minister, in a 2001 election.
Barak's short premiership collapsed amid failed efforts at making peace with Syria and the Palestinians.
But Barak has played on his experience, saying on Monday: "I tell voters only two things: I tell them to think about who they want more in a time of war, and I tell them that only with me heading our team can we beat Netanyahu."
Ayalon, who only entered parliament last year, said on Monday: "I think many people understand that we are, in fact, not just voting on the future of the Labour Party but to a very large extent on the future leadership of the state of Israel."
With the possibility of a challenge to his leadership, Olmert could face three options - to resign, to try to form a new coalition with an ultra-Orthodox or a right-wing party, or call for early elections.
About 104,000 party members were eligible to vote in Monday's contest.