JERUSALEM - Israel stepped back from the brink of political turmoil Wednesday after the two main parties in the ruling coalition hammered out a last-minute compromise to prevent the passage of a bill calling an election.
This gives Prime Minister Ehud Olmert a few more months to pursue peace talks with the Palestinians and to try to win release of three captured soldiers. But the price was agreeing to a primary election in September that is likely to end his reign.
Olmert's main coalition partner, Labour, was poised to vote in favour of a bill to dissolve the parliament and call elections Wednesday. Labour's support would have guaranteed approval, mostly symbolic at this stage because the bill would have needed to pass three more parliamentary votes to become law.
Olmert had threatened to fire Labour cabinet ministers if they voted for the election bill. That would have removed his parliamentary majority and made elections inevitable.
An election campaign would put peace efforts far onto the back burner.
Instead, Olmert agreed to a Labour demand for primaries in his Kadima party by Sept. 25 in exchange for Labour's dropping its support of the election bill.
Olmert has lost most of his public support because of an inconclusive war with Lebanese Hezbollah guerrillas in 2006 and several corruption investigations against him. Labour party leader Ehud Barak, the defence minister, has repeatedly called for Olmert's ouster, only to back away from taking decisive action.
The compromise allowed both Olmert and Barak to save face. Olmert can remain in office and keep his coalition intact, while Barak can tell supporters that he is forcing Kadima to replace its leader.
Kadima officials say Olmert has not ruled out running in the party primary, hoping to clear his name after a cross-examination of a key witness in the latest corruption case, American businessman, Morris Talansky, slated for July 17. But opinion polls show Olmert unpopular within the party and among the general public, and unlikely to win.
His likely successor as head of Kadima would be Foreign Minister Tzipi Livni or Transportation Minister Shaul Mofaz.
But even if one of them replaces Olmert after the September primaries, general elections would not be far off, possibly as early as November.
Polls indicate that the hardline Likud, led by ex-prime minister Benjamin Netanyahu, would win an election now. Likud sponsored the election bill, and bitterness came quickly to the surface in the parliament after Labour withdrew its support, forcing Likud to withdraw the measure.
Another Likud leader, Gideon Saar, called Labour legislators "wimps" from the podium, setting off an angry exchange with the parliament speaker, Dalia Itzik of Kadima.
When Olmert got up to speak, the hardliners from Likud tried to shout him down. Olmert retorted, "You call any effort toward peace 'surrender' because you don't want peace."
Olmert announced that his cabinet will vote Sunday on a proposed prisoner exchange with Hezbollah, which is holding two Israeli soldiers it captured two years ago, setting off the 34-day war. The exchange is said to include freedom for Samir Kantar, a Lebanese serving multiple life terms for a 1979 attack in which four Israelis were killed.
This week the chief military rabbi started examining evidence to determine whether they two soldiers can be officially declared dead. They were known to be badly wounded when they were captured.
Political analyst Hanan Crystal said the Kadima primaries will not prevent Olmert from pushing the international community for tougher action against Iran for its nuclear program. Israel believes Iran is pursuing nuclear weapons.
Also, Israel and Syria are holding indirect talks through Turkish mediators, Olmert's government is in U.S.-sponsored peace talks with moderate Palestinian President Mahmoud Abbas and is maintaining a tenuous truce with the Islamic Hamas regime in Gaza.
"Ehud Olmert has what he wants, the big political exit he wanted, with Iran, with Syria and with Gaza," Crystal told Israel Radio. "He is the legitimate prime minister for the entire summer."