In a surprise move, Binyamin Netanyahu, Israel's prime minister, has called off plans for early elections and formed a unity government with the centrist Kadima party.
The recently elected head of Kadima, Shaul Mofaz, will be named deputy prime minister in the newlook government, officials said, adding that the accord would be formally ratified later on Tuesday and presented to parliament.
"A broad national unity government is good for security, good for the economy and good for the people of Israel," said a statement from the prime minister's office, quoting Netanyahu.
Gilad Erdan, environment minister, said the accord would help build support for potential action against Iran's atomic programme which Israel views as an existential threat.
Iran says its nuclear programme is being pursued purely for civil purposes.
Netanyahu and Mofaz negotiated the eleventh-hour deal as the Knesset, Israel's parliament, was voting on a motion to end its current session to clear the way for an early election that the prime minister himself had said he wanted.
Less than four months ago Mofaz publicly called Netanyahu a "liar", and just two months ago he vowed he would never join the Israeli leader's coalition.
Recent opinion polls suggested Kadima would suffer huge losses were elections to be held, dropping to around 10 or 11 seats.
"Since regaining power within Kadima two weeks ago, Mofaz has ranted against the prime minister as a centrepiece of his primary victory address," Al Jazeera's Cal Perry reported from Jerusalem.
Even before he was elected as head of Kadima on March 28, Mofaz was quick to criticise Netanyahu and his coalition, positioning his party as the alternative which could lead the Israeli government.
"Israelis should know that their prime minister is a liar," he said at the conclusion of a closed Knesset committee meeting in January, blaming Netanyahu for leaking an inaccurate quote in his name.
Just over a month later, during his campaign for the party leadership, Mofaz pledged he would not join Netanyahu's government in any constellation.
"Listen carefully: I won't enter Bibi's government," he wrote on his Facebook page on March 3.
"Not today. Not tomorrow and not after I lead Kadima on March 28. This is a bad, failed and insensitive government and Kadima under my leadership will replace it in the next elections. Is this clear enough?"
As deputy prime minister in a former Kadima-headed government in 2008, Mofaz was among the first Israeli officials to publicly moot the possibility of an attack on Iran.
A one-time defence minister, the Tehran-born Mofaz has been more circumspect while in the opposition, saying Israel should not hasten to break ranks with war-wary world powers trying to pressure Iran through sanctions and negotiations.
The next national election had not been due until October 2013, but in a surprise move, Netanyahu had pushed this month for an early poll after divisions emerged in his coalition over a new military conscription law.
Parliament was preparing for a final vote to dissolve itself and clear the decks for a September 4 ballot, while the backroom talks with Kadima were under way.
Tuesday's accord stunned the political establishment and drew swift condemnation from the centre-left Labour party, which had been touted in opinion polls to be on course for a resurgence at the expense of Kadima.
"This is a pact of cowards and the most contemptible and preposterous zigzag in Israel's political history," party leader Shelly Yachimovich was quoted as saying in the media, where commentators hailed Netanyahu's political prowess.
Kadima, with 28 seats, will add significant weight to the coalition, but it remains uncertain how it will get along with religious and ultra-right parties also in the cabinet.
Inter-government relations are likely to be tested swiftly over the issue of settlement building after the high court ordered the government on Monday to demolish five apartment buildings in an Israeli settlement in the occupied West Bank.
Many of Netanyahu's supporters want him to push through legislation to legalise places, such as the Ulpana apartments, which a court has ruled were built on privately owned Palestinian land.
It is not clear if Kadima would support such a move, which would draw international condemnation on Israel.
Source: Al Jazeera and agencies