Israel and Hamas have agreed to a ceasefire to end eight days of the fiercest fighting in nearly four years.
They promised to halt attacks on each other and ease an Israeli blockade constricting the Gaza Strip.
Palestinian gunmen in Gaza fired into the air in celebration. At UN-run schools in Gaza, where thousands had fled for protection, children and parents cheered and clapped.
Abdel-Nasser al-Tom, from northern Gaza, said: "I just hope they commit to peace."
The deal was brokered by the new Islamist government of Egypt, solidifying its role as a leader in the quickly-shifting Middle East after two days of intense shuttle diplomacy that saw US secretary of state Hillary Clinton race to the region.
Under the agreement, Egypt will play a key role in maintaining the peace.
Minutes before the deal took effect, there was a last flurry of Palestinian rocket attacks and Israeli airstrikes, including one that killed a man minutes before the deadline.
Israel has launched well over 1,500 airstrikes and other attacks on targets in Gaza since fighting started last Wednesday, while more than 1,000 rockets pounded Israel. In all, 161 Palestinians, including dozens of non-combatant civilians, were killed, while five Israelis died.
Standing next to Mrs Clinton, Egypt's foreign minister Mohammed Kamel Amr announced the truce breakthrough that capped days of intense efforts that involved the world's top diplomats.
The agreement will "improve conditions for the people of Gaza and provide security for the people of Israel", Mrs Clinton said at the news conference in Cairo.