Israeli media is reporting that a unity government agreement has been reached Wednesday. 

Israeli Prime Minister Benjamin Netanyahu's coalition has reportedly reached an agreement with main opposition leaders, former Prime Minister Yair Lapid and former Defense Minister Benny Gantz, to form an emergency unity government following Saturday's surprise attack by Hamas. An agreement was reached in principle Tuesday, according to Reuters. 

Netanyahu and Gantz were reportedly meeting Wednesday to finalize the details, the Times of Israel reported. 

Gantz later released what he said was a joint statement with Netanyahu, according to The Associated Press. The statement said they would form a five-member "war-management" cabinet. It will consist of Netanyahu, Gantz, current Defense Minister Yoav Gallant and two other top officials serving as "observer" members.

LIVE UPDATES: ISRAEL AT WAR WITH HAMAS AFTER SURPRISE ATTACKS, MORE THAN 1,200 ISRAELIS DEAD

Israeli PM addresses the UN

Israeli Prime Minister Benjamin Netanyahu addresses world leaders during the United Nations General Assembly on Sept. 22, 2023 in New York City. ( Spencer Platt/Getty Images)

The statement said the government would not pass any legislation or decisions that are not connected to the war as long as the fighting continues. It was not immediately clear what would happen to Netanyahu’s existing government partners, a collection of far-right and ultra-Orthodox parties.

Five days into the war in Israel, Netanyahu and Gantz were reportedly hashing out a deal on the unity government at the Kirya military headquarters in Tel Aviv. 

NONBINARY NYU STUDENT BAR ASSOCIATION PRESIDENT LOSES JOB OFFER AFTER DEFENDING HAMAS TERROR ATTACK ON JEWS

Israeli opposition leaders

Israeli Prime Minister Yair Lapid and Israeli Minister of Defense Benny Gantz react at the Israeli parliament during a new government sworn in discussion at the Israeli parliament on Dec. 29, 2022, in Jerusalem. (Amir Levy/Getty Images)

Some reports, including those by the Maariv daily newspaper and Channel 12 news, suggested that Netanyahu's wife, Sara, was advocating for Gantz's National Unity party to be left out of the coalition. The former defense minister has previously called for Netanyahu's ouster over the prime minister's alleged embrace of those who Gantz deemed as extremists, Netanyahu's ongoing corruption trial and the coalition's support of a judicial reforms package that critics argue reduced the Supreme Court’s powers to check and balance government or executive decisions. 

However, the killing of more than 1,200 Israelis and the capture of more than 100 others by Hamas militants have brought a newfound urgency for the opposition parties to come together. 

Gaza bombed out

A man carrying a box leaves a bombed area following overnight Israeli airstrikes in Gaza City on Oct. 11, 2023, the fifth day of continuing battles with Hamas. (MOHAMMED ABED/AFP via Getty Images)

CLICK TO GET THE FOX NEWS APP

Gantz had reportedly been urging the creation of a small war cabinet with "real influence" over the management of the war, according to the Times of Israel. He wanted that cabinet to include at least two opposition politicians with the highest levels of military experience. Both Gantz and fellow National Unity party member Gadi Eisenkot are former Israel Defense Forces chiefs of staff. Gantz was also defense minister in the past. The opposition party called for Netanyahu to choose only "relevant ministers" with military experience for the war cabinet, which the Times of Israel says suggests a possible exclusion of many of the current far-right and ultra-Orthodox members of Netanyahu's coalition who do not have military experience. 

Fox News' Yonat Friling, Jennifer Johnson, The Associated Press and Reuters contributed to this report.