Israel and Hamas agreed on Wednesday to a ceasefire brokered by Egypt, Egyptian Foreign Minister Mohamed Kamel Amr announced during a press conference with US Secretary of State Hillary Clinton.
Announcing the ceasefire in Cairo, Egyptian Foreign Minister Mohamed Kamel Amr said it would come into force at 9 pm. A flurry of explosions shook Gaza City as the truce deadline approached and several rockets landed in the southern Israeli city of Beersheba.
Amr said mediation efforts had "resulted in understandings to cease fire, restore calm and halt the bloodshed."
Clinton, standing alongside him, thanked Mohamed Morsy for his peace efforts, saying his government was assuming "responsibility, leadership" in the region.
President Barack Obama called Morsy on Wednesday night, praising his efforts to help broker a ceasefire, the White House said.
Obama spoke earlier with Israeli Prime Minister Benjamin Netanyahu.
Israeli sources said earlier that Israel had agreed to a truce, but would not lift its blockade of the Palestinian territory, which is run by the Islamist Hamas movement.
More than 140 Palestinians and five Israelis have been killed in the fighting that began last Wednesday.
Israel's best-selling Yedioth Ahronoth newspaper had reported an emerging outline of a ceasefire agreement that called for Egypt to announce a 72-hour ceasefire followed by further talks on long-term understandings.
Under the proposed document, which the newspaper said neither party would be required to sign, Israel would hold its fire, end attacks against top militants and promise to examine ways to ease its blockade of Gaza, controlled by Hamas Islamists who do not recognize the Jewish state's right to exist.
Hamas, the report said, would pledge not to strike any Israeli target and ensure other Palestinian factions in the Gaza Strip also stop their attacks.
Israel has carried out more than 1,500 strikes since the offensive began with the killing of a top Hamas commander and with declared aim of deterring Hamas from launching rocket attacks that have long disrupted life in its southern towns.
Medical officials in Gaza said 146 Palestinians, more than half of them civilians, including 36 children, have been killed in Israel's offensive. Nearly 1,400 rockets have been fired into Israel, killing four civilians and a soldier, the military said.