Israel has withdrawn its troops from the Gaza Strip to "defensive positions" outside the Palestinian territory.
It says the main aim of its offensive - to destroy militants' tunnels - has been achieved.
A 72-hour truce - brokered by Egyptian mediators late on Monday - came into force at 08:00 local time (05:00 GMT) and appears to be holding.
Gaza officials say the four-week conflict has killed 1,800 Palestinians. Some 67 Israelis have also been killed.
"The Israel Defense Forces will be redeployed in defensive positions outside the Gaza Strip and we will maintain those defensive positions," Israeli military spokesman Lt-Col Peter Lerner said.
Just minutes before the truce came into effect, air raid sirens sounded in Jerusalem and Tel Aviv as Hamas militants fired a barrage of rockets at central Israel. Israeli forces also staged raids in Gaza shortly before the ceasefire began.
Israel launched Operation Protective Edge on 8 July with the stated aim of ending rocket attacks and destroying tunnels used by Palestinian militants.
In a statement just ahead of the withdrawal, the Israel Defense Forces (IDF) said that since then it had eliminated 32 tunnels designed to allow militants to carry out raids into Israel, destroyed 3,000 missiles on the ground and killed about 900 "terrorists".
The IDF estimated that some 3,300 rockets had been fired at Israel during this period, and that Hamas had another 3,000 rockets left for future use.
AT THE SCENE: MARTIN PATIENCE, GAZA CITY
Ceasefires, truces, lulls in the fighting have all come and gone in Gaza but I think there is one big difference with this ceasefire and that is that Israeli troops have withdrawn. The reason they have been in here is to destroy the cross-border tunnels that have been dug by Hamas - the Israeli media are now reporting that that operation is complete.
In terms of what is happening here in Gaza City, it is quiet. I have just been down to the port and I have seen fishermen heading out to sea. I have been here for more than a week now and that is the first time I have seen that. People here will be taking this opportunity to get out of their homes, stock up on supplies and try to make sense of all the death and destruction here after the last four weeks.
AT THE SCENE: BETHANY BELL IN JERUSALEM
Israel says it has withdrawn its troops from Gaza as it has completed its main goal in this operation, the destruction of 32 cross-border tunnels.
However, it is possible that some tunnels may have gone undetected and it is likely that the Israeli army's search along the border will go on. The threat of Gaza militants entering Israel from under the ground has caused great concern in Israel.
There is some suggestion that an Israeli delegation may be preparing to go to Cairo for talks on a more long-term truce. There has been intense international pressure on Israel to try to negotiate an end to the fighting, particularly given the incidents at UN schools in Gaza and the high number of Palestinian civilian casualties.Getty
There have been several truces called during the conflict but few have lasted, with each side accusing the other of violations.
Egypt negotiated a similar truce earlier in the conflict that was accepted by Israel but rejected by Hamas.
The new agreement proposes that delegations from all sides should attend further talks in Cairo.
The main Palestinian demands remain on the table, notably a full Israeli troop withdrawal from Gaza, the end of the blockade of the territory and the opening of border crossings.
Israeli Prime Minister Benjamin Netanyahu has said that Israel's main goal is to "return quiet and security to the citizens of Israel".
UN Secretary General Ban Ki-moon has welcomed the ceasefire. He called on both sides to hold talks in Egypt and for them to begin as soon as possible.
Meanwhile, Palestinian Foreign Minister Riad al-Malki has met prosecutors at the International Criminal Court in The Hague.
Speaking after the meeting, he told reporters there was "clear evidence of war crimes committed by Israel amounting to crimes against humanity".