"An agreement ending the current operations between the two sides, including a halt to assassinations, entered into force at 1:00 am," an Egyptian intelligence official told AFP on condition of anonymity.
He said the deal was reached after "intensive contacts" with both sides in a bid "to stop the military operations against the Gaza Strip and to end Palestinian bloodletting."
Officials from Israel and Hamas declined to comment on the agreement.
The truce announcement came after four days of violence that began on Friday with Israel's assassination of the head of the Popular Resistance Committees, a militant group.
The strike prompted Gaza militants to fire hundreds of rockets and mortar rounds into southern Israel, wounding five people and prompting authorities to shut down schools and ban large gatherings in the area.
The Israeli military carried out dozens of air strikes during the flare-up, saying it was targeting militants and weapons facilities.
Palestinian medics put the total death toll late on Monday at 25, with more than 80 injured.
Of those killed, 19 were militants -- 14 from Islamic Jihad, and five from the Popular Resistance Committees -- and six were civilians, among them two minors.
In the hours before the ceasefire, four air strikes were reported, including one east of Gaza City that left two members of Islamic Jihad dead.
And between midnight and 9:00 pm (2200 GMT Sunday and 1900 GMT Monday), Gaza militants fired 66 rockets and mortar rounds, the army said, of which 42 hit Israeli territory, and 24 were intercepted by the Iron Dome missile system.
On Monday, Israeli Prime Minister Benjamin Netanyahu had warned that the army could expand its operations if the fire continued.
"The Israeli army is prepared to expand its activities, and will continue its activities as long as necessary," he told MPs from his rightwing Likud party, hailing the Jewish state's "crushing offensive abilities."
But throughout the days of violence, Hamas said it was working with Egypt to end the conflict and restore the relative calm that had been in place.
The latest round of violence began on Friday after Israel killed Zuhair al-Qaisi, head of the Popular Resistance Committees, prompting militant groups to begin lobbing rockets over the border.
The army said Qaisi had planned a deadly attack in August 2011 and accused him of planning a repeat attack "in the coming days."
The violence prompted international concern, with US Secretary of State Hillary Clinton on Monday condemning the "rocket fire from Gaza by terrorists into southern Israel."
"We call on those responsible to take immediate action to stop these attacks. And we call on both sides, all sides, to make every effort to restore calm," she told the UN Security Council.
She later joined her counterparts from the European Union, Russia and the United Nations for a meeting of the so-called Middle East Quartet, which "expressed serious concern for the recent escalation."
"The Quartet reiterates its call on the parties to remain engaged and to refrain from provocative actions," a statement said.