"Both sides have pledged to halt all hostilities and all military activities against each other," Egyptian Foreign Ministry spokesman Hossom Zaki said in Cairo, according to Reuters.
The Egyptian-brokered agreement came about after weeks of separate talks with Israel and Hamas.
Ismail Haniyeh, head of the Hamas government in the Gaza Strip, said in a statement that progress had been achieved toward halting Israeli "aggression and ending the siege."
Hamas officials said other Palestinian factions had agreed to abide by the cease-fire, according to Reuters.
The deal is aimed at ending nearly daily rocket and mortar attacks on Israel from Hamas-controlled Gaza Strip and Israeli raids and airstrikes on the region. Just before Tuesday's announcement, Israel launched airstrikes on Gaza that killed six militants.
Israel, which would not confirm or deny the deal, has said it would continue preparing for possible large-scale military action should the truce fall apart.
"What is important is not only words but deeds," said Mark Regev, a spokesman for Israeli Prime Minister Ehud Olmert, Reuters reported.
He reiterated Israel's demands for an end to attacks on Israeli civilians, an end to arms smuggling in Gaza and progress toward the release of Israeli soldier Gilad Shalit, who was seized by Gaza militants two years ago.
Israeli and Palestinian officials said earlier Tuesday that any accord would mean only gradually and partially easing a blockade Israel imposed on the Gaza Strip after Hamas took control of the territory a year ago.
Opening Gaza crossings with Israel and Egypt is one of Hamas' main demands in the truce talks.
Skepticism has surrounded the talks, and not only because past truces -- most recently, a November 2006 deal -- have broken down fairly quickly.
Militants in Gaza had stepped up attacks on Israel after Hamas seized control of the territory from forces loyal to moderate Palestinian President Mahmoud Abbas.
Israel has responded with air and ground attacks that have killed hundreds of Palestinians, many of them civilians, according to the Associated Press.
In Washington, the State Department declined to confirm early reports of a truce, but said it was supportive of efforts to bring calm to Gaza and southern Israel while insisting that Hamas remained a terrorist organization.
"We believe that establishing calm in Gaza and elsewhere is a good thing and we're supportive of Egyptian efforts and other efforts to achieve this," deputy spokesman Tom Casey told reporters, the AP reported.