Israeli Prime Minister Benjamin Netanyahu's office said his security cabinet had voted unanimously in favour of a "mutual and unconditional" Gaza truce proposed by Egypt, but added that the hour of implementation had yet to be agreed.
Egypt's state-run MENA news agency said the truce would take effect at 2 a.m., roughly three hours after the announcement. People went out of their homes, some shouting "Allahu Akbar" or whistling from balconies.
The agreement would close the heaviest round of fighting between the bitter enemies since a 50-day war in 2014, and once again there was no clear victor.
The United Nations chief urged Israel and Gaza's Hamas rulers to observe the cease-fire. A statement boasted of "significant achievements in the operation, some of which are unprecedented". It also stated that it believes deterrence has been reestablished against Hamas.
"This is the euphoria of victory", said Khalil al-Hayya, the second most senior member of the Islamist movement's political bureau in the Gaza Strip.
Al-Malki cited the "desecration" by Israeli soldiers and settlers of the Al-Aqsa mosque and accused Israel of trying to erase the multi-cultural and multi-religious character of the city of Jerusalem, saying: "We are opposed to that, we reject that, and we'll keep working to prevent that from happening".
The United States has repeatedly objected to a U.N. Security Council statement since fighting erupted 11 days ago between Israel and Hamas militants and other groups in Gaza. Dozens of projectiles flew as far north as Tel Aviv, the country's bustling commercial and cultural capital.
Tuesday's rocket attack from Gaza hit a packaging plant in a region bordering the territory, killing two Thai workers.
Since fighting broke out on May 10, Israel has launched hundreds of airstrikes that it says have targeted Hamas' infrastructure, including a vast tunnel network.
At least 227 Palestinians have been killed, including 64 children and 38 women, with 1,620 people wounded, according to the Gaza Health Ministry, which does not break the numbers down into fighters and civilians.
Twelve people in Israel, including a 5-year-old boy, a 16-year-old girl and a soldier, were also killed. But as the fighting dragged on and the death toll mounted, the Americans increasingly pressured Israel to stop the offensive.
But late Thursday, Netanyahu's office announced the cease-fire agreement. In another sign of potential escalation, militants in Lebanon fired a rocket barrage into northern Israel.
The session was requested by Pakistan, which is the coordinator of the Organisation of Islamic Cooperation, and the Palestinian authorities, it says.
An Egyptian official said only that tensions in Jerusalem "will be addressed". The diplomat spoke on condition of anonymity in line with regulations. But the inconclusive outcome of the war could give them renewed momentum to restart those talks.
The International Committee of the Red Cross warned that people in both Gaza and Israel "urgently need respite from non-stop hostilities". Israeli officials made the case to the White House that Hamas' message lost resonance as mob violence against Arabs in mixed Israeli cities, including Lod, was tamped down.
Since the fighting began, Gaza's infrastructure, already weakened by a 14-year blockade, has rapidly deteriorated.
Biden also offered condolences for Palestinian lives lost during the conflict and vowed humanitarian aid would quickly flow through the Palestinian Authority, which is in control of the West Bank but not Gaza.
Israeli attacks have damaged at least 18 hospitals and clinics and destroyed one health facility, the World Health Organization said. Almost half of all essential drugs have run out.
Israeli airstrikes into Gaza demolished a six-story building housing bookstores and educational centers used by the Islamic University and other colleges. While repairs are done, education will be disrupted for almost 42,000 children. There were also heavy airstrikes on a commercial thoroughfare in Gaza City. Associated Press writers Ilan Ben Zion in Jerusalem, Samy Magdy in Cairo, Zeke Miller in Washington and Iris Samuels in Helena, Montana, contributed reporting.