The cease-fire was to take effect at 7 p.m. local time (1600 GMT), but violence persisted until the last minute.
In Israel, mortar shells fired from Gaza killed one man and seriously wounded two people, authorities said.
In Gaza, police reported that an Israeli airstrike collapsed a seven-story building in the town of Beit Lahiya, the sixth high-rise to be toppled since the weekend. Booms from Israeli strikes could be heard in Gaza after the truce announcement was made.
In Gaza, massive celebratory gunfire erupted after 7 p.m. Chants normally reserved for Muslim holidays could be heard from mosque loudspeakers.
Earlier, officials from Hamas and Islamic Jihad, the main groups fighting Israel, had said the cease-fire included an Israeli agreement to ease its blockade of Gaza to allow relief supplies and construction materials into the war-battered territory.
Talks on more complex issues, such as Hamas' demand to build an airport and a seaport for Gaza, would begin in a month, said Ziad Nakhala, a senior Islamic Jihad official.
The details of the cease-fire would effectively mean Hamas and Islamic Jihad settled for terms that are similar to those that ended more than a week of fighting with Israel in 2012.
Under those terms, Israel promised to ease restrictions gradually, while Hamas pledged to halt rocket fire from Gaza at Israel. The truce held for long stretches, but Gaza's border blockade also remained largely intact.
Even though it apparently had little to show for, Hamas declared victory.
"We are here today to declare the victory of the resistance, the victory of Gaza, with the help of God, and the steadfastness of our people and the noble resistance," Hamas spokesman Sami Abu Zuhri said in a news conference at Gaza's Shifa Hospital.
Israel and Egypt imposed the blockade after Hamas seized Gaza by force in 2007. Under the restrictions, virtually all of Gaza's 1.8 million people cannot trade or travel. Only a few thousand are able to leave the coastal territory every month.
During the war, Hamas had said it would only cease fire if the blockade is lifted.
However, Israeli pressure on the group has been escalating. Hamas is believed to be left with just one-third of its initial rocket arsenal of 10,000, while Israel says it has destroyed most of Hamas' network of military attack tunnels.
Israeli strikes have destroyed or severely damaged more than 17,000 Gaza homes, according to United Nations estimates, leaving about 100,000 people homeless. The number of dead has also been rising steadily, reaching at least 2,140 by Tuesday, with more than 11,000 Gazans wounded since July 8, Palestinian health officials said.
On the Israeli side, 69 people have been killed, all but four of them soldiers. Thousands of Israelis living near Gaza have fled their homes, including in recent days when Gaza militants stepped up mortar fire on southern Israel.