Israel and the two main armed groups in Gaza agreed to a ceasefire on Thursday aimed at ending end 11 days of deadly violence.
A statement from Israeli Prime Minister Benjamin Netanyahu's office said the security cabinet had "unanimously accepted the recommendations to accept an Egyptian initiative for an unconditional... ceasefire."
Hamas and Islamic Jihad then confirmed the ceasefire in a statement, saying it would come into force at 2am Friday (2300 GMT).
The Israeli statement did not mention as to when the truce would come into force.
The fighting has seen Israeli jets pound Gaza with air strikes as militants fired thousands of rockets into Israel, after days of tensions in Jerusalem sharply escalated on May 10.
Earlier Thursday in the southern Gaza town of Rafah, an AFP reporter saw devastating Israeli air strikes turn buildings into clouds of dust and rubble as an ambulance sped across town to help the wounded.
Rocket fire from Gaza had intensified in the afternoon, sending Israelis nearby running for shelters, according to Israeli Army warnings.
United Nations chief António Guterres had told the General Assembly Thursday that "the fighting must stop immediately."
"If there is a hell on earth, it is the lives of children in Gaza," Guterres added.
News of the ceasefire deal came after US President Joe Biden called for a "significant de-escalation."
Israeli Prime Minister Benjamin Netanyahu, who attended the evening meeting with top security officials, had earlier vowed to push on until the military campaign reaches its objective, "to restore quiet and security" for Israelis.
UN Middle East peace envoy Tor Wennesland was visiting Qatar for talks with Ismail Haniyeh, the political leader of Hamas, as part of an effort to "restore calm," according to a diplomatic source.
German Chancellor Angela Merkel said "indirect talks" with Hamas were essential to advancing efforts toward an end of hostilities.
"Of course Hamas has to be included, because without Hamas there will be no ceasefire," Merkel said, who also spoke to Palestinian president Mahmud Abbas Thursday, where they agreed the need "for a speedy ceasefire."
Her foreign minister, Heiko Maas, speaking earlier near Tel Aviv, expressed Germany's "solidarity" with Israel but also called for an end to the fighting.
"Israel has the right to defend itself against this massive and unacceptable attack," Maas said of the rockets Hamas first fired on May 10 after violent clashes between Israeli police and Palestinians in Jerusalem's Al-Aqsa mosque compound.
"The number of victims is rising every day and this greatly concerns us."
A senior Hamas official told AFP earlier Thursday that Qatar, a Gulf state that hosts Haniyeh and sends financial aid to Gaza, was at the heart of "intense" negotiations.
The Israeli Army said Hamas and other Islamist armed groups in Gaza have fired 4,070 rockets towards Israel, but the overwhelming majority of those headed for populated areas were intercepted by its Iron Dome air defences.
The rockets have claimed 12 lives in Israel, including two children and an Israeli soldier, with one Indian and two Thai nationals among those killed, the police say.
Israeli strikes on Gaza have killed 232 Palestinians, including 65 children, fighters and another 1,900 wounded, according to the Gaza Health Ministry, leaving vast areas in rubble and displacing some 120,000 people, according to Hamas authorities.
Overnight, Israel had continued to pound Gaza with air strikes and artillery fire aimed at destroying Hamas tunnels and other infrastructure, the military said.
'Sitting in his wheelchair'
One Israeli strike on Gaza on Wednesday killed a disabled man, his pregnant wife and their three-year-old child, the enclave's Health Ministry said.
"What did my brother do?" the man's bereaved brother Omar Saleha, 31, told AFP. "He was just sitting in his wheelchair."
Israel says it takes all steps to avoid civilian casualties, including by phoning residents to warn them of imminent strikes, and blames Hamas for placing weapons and military sites in densely populated areas.
The United States, a key Israel ally, has repeatedly blocked any joint UN Security Council statement calling for a halt to hostilities, including one proposed by France, saying it could undermine de-escalation efforts.
Israel's bombing campaign has left the two million people of Gaza, which has been under Israeli blockade for 14 years, desperate for relief.
The International Committee of the Red Cross warned that people in both Gaza and Israel "urgently need respite from non-stop hostilities."
The military conflict has sharply heightened tensions and sparked violence between Jews and Arab-Israelis, while Palestinian protesters in the West Bank and east Jerusalem have repeatedly clashed with security forces.
In the West Bank, the Army has killed 25 Palestinians since the outbreak of hostilities. The worst death toll in years in the occupied Palestinian territory includes several Palestinians who the Israeli Army said had attempted to ram or stab Israeli forces at checkpoints.