In a dramatic nightime turn of events, Israeli Prime Minister Benjamin Netanyahu reached an agreement with the Kadima opposition party for a unity government, canceling an early election he had called only a day before, Israeli media reported.

The reports of the agreement came just before parliament, the Knesset, was about to vote to disperse, the Associated Press reported.

There was no immediate comment from official sources on the decision, which was reported around 2 a.m.

The reports came as Israel's parliament held debates long into the night over whether to break up ahead of early elections called for the fall. The vote had passed a first reading to disperse by 119-1 shortly before the agreement was reported. Knesset spokesman Yotam Yakir said no final vote was taken and parliament is not dispersing.

Earlier Monday, the Israeli government proposed that the election, previously scheduled for October 2013, be moved up to Sept. 4.

According to the media reports, Netanyahu forged an agreement with opposition leader Shaul Mofaz of Kadima shortly before parliament was set to vote to disperse.

Under the deal between Netanyahu and Mofaz, the prime minister reportedly agreed to make Mofaz a vice prime minister and pledged to back a revision of the law, bitterly resented by secular Jews, that lets ultra-Orthodox men evade mandatory military service, the Jewish Telegraphic Agency reported. Once the agreement was reached at about 2 a.m., Kadima's faction approved it unanimously, the Jerusalem Post reported. 

Parliament Speaker Reuven Rivlin, a veteran of Israeli politics, said he had never seen such a last-minute political upheaval. This is good for Israel because it brings stability, he said on Army Radio as he left parliament before sunrise.

Mofaz was elected head of Kadima less than two weeks ago, when he defeated former party head Tzipi Livni in the party's leadership primary, the Israeli newspaper Haaretz reported.

In an interview with Haaretz ahead of the primary, Mofaz insisted that, if elected, he would not join a government led by Netanyahu

Kadima under my leadership will remain in the opposition. The current government represents all that is wrong with Israel, I believe. Why should we join it? he said at the time.

The appointment of Mofaz, a former military chief and defense minister, is significant in Israel's standoff with Iran, as he has been a vocal critic of Israel striking Iran's nuclear sites on its own.

The call for early elections had renewed speculation that Israel might attack Iran's suspect nuclear program, perhaps within months.