* Ceasefire began at 8 a.m. (0500 GMT)
* Hamas media says Israeli fire kills 4 after truce starts
* Longer-term truce to be discussed in Cairo
* Israel says tunnel destruction operation continuing
By Nidal al-Mughrabi
GAZA/JERUSALEM, Aug 1 (Reuters) - A three-day ceasefire between Israel and Palestinian militant groups in the Gaza Strip went into effect on Friday, with negotiators due to travel to Cairo to discuss a longer-term solution.
But some two hours after the truce began, a Reuters photographer and the Gaza Interior Ministry said Israeli tanks opened fire in the southern Rafah area, and Hamas media reported four people were killed. The Israeli military had no immediate comment.
The 72-hour break announced in a joint statement by U.S. Secretary of State John Kerry and U.N. Secretary-General Ban Ki-moon was the most ambitious attempt so far to end more than three weeks of fighting, and followed mounting international alarm over a rising Palestinian civilian death toll.
"This ceasefire is critical to giving innocent civilians a much-needed reprieve from violence," the statement said.
After the ceasefire began at 8 a.m. (0500 GMT), Gaza's streets began to fill with Palestinian families. Laden with belongings, they streamed back to homes they fled during fierce fighting that destroyed or damaged thousands of dwellings.
In Israel, sirens that have sent tens of thousands running for shelter daily fell silent.
"We are going back to Beit Lahiya (in the northern Gaza Strip)," said Asharaf Zayed, a 38-year-old father of four. "We hope the truce will be permanent and we won't have to go back to a U.N. shelter."
Israel launched its offensive in Hamas Islamist-dominated Gaza on July 8, unleashing air and naval bombardments in response to a surge of cross-border rocket attacks. Tanks and infantry pushed into the densely populated territory of 1.8 million on July 17.
Gaza officials say at least 1,459 Palestinians, most of them civilians, have been killed in the battered enclave and nearly 7,000 wounded. Sixty-one Israeli soldiers have been killed in the fighting and more than 400 wounded. Three civilians have been killed by Palestinian rockets in Israel.
Amid strong public support in Israel for the Gaza campaign, Prime Minister Benjamin Netanyahu had faced intense pressure from abroad to stand his forces down.
International calls for an end to the bloodshed intensified after shelling on Wednesday that killed 15 people sheltering in a U.N.-run school in Gaza's Jabalya refugee camp.
The truce left Israeli ground forces in place in the Gaza Strip and a military spokeswoman said operations were continuing to destroy a warren of tunnels through which Hamas has menaced Israel's southern towns and army bases.
"We are doing what needs to be done in order to neutralise them," she said.
Accomplishing that mission - the military said on Thursday the tunnels hunt could be wrapped up in a few days - could open the way for Israel to declare it has achieved the main goal of the ground assault and withdraw its soldiers from Gaza.
"Our understanding is that the Israelis will make clear to the U.N. where their lines are, roughly, and they will continue to do operations to destroy tunnels that pose a threat to Israeli territory that lead from the Gaza strip into Israel proper as long as those tunnels exist on the Israel side of their lines," a U.S. State Department official said.
Hamas, isolated in an Arab world concerned about the rise Islamist militancy, is seeking an end to Israel's blockade of Gaza. It also wants a hostile Egypt to ease restrictions at its Rafah crossing with the territory imposed after the military toppled Islamist president Mohamed Mursi last July.
Israel has balked at freeing up Gaza's borders under any de-escalation deal unless Hamas's disarmament is also guaranteed.
A senior State Department official travelling with Kerry in India said U.S. Deputy Secretary of State Bill Burns would arrive in Cairo on Saturday and that Frank Lowenstein, the acting U.S envoy for Middle East peace, and another U.S. official, Jonathan Schwartz, would be there on Friday.
The official said he believed the Palestinians would be in the Egyptian capital on Friday, while the Israelis would arrive on Saturday.
The Palestinian delegation will be comprised of Hamas, Western-backed Fatah, the Islamic Jihad militant group and a number of smaller factions, Palestinian officials said.
But U.S. officials said representatives from Israel and the United States would not sit across the table from Hamas, which the two countries, along with the European Union, consider a terrorist group.
Just over an hour before the ceasefire was due to take effect militants fired 11 rockets into Israel, one of which was intercepted by the Iron Dome defence system over the centre of the country, a military spokeswoman said.
Israeli strikes killed 14 people in Gaza, including eight from one family, hospital officials said. Earlier, Hamas rockets set off sirens in the Tel Aviv area and one was intercepted.
Israel's military said five of its soldiers were killed late on Thursday by a mortar bomb.
Previous international attempts to broker a humanitarian truce were less successful, securing shorter periods of calm, with some collapsing immediately after being announced.
U.N. political affairs chief Jeffrey Feltman said it took a massive diplomatic push to achieve the ceasefire.
"The Egyptians played an important role, the Qataris played an essential role in helping bring the parties on board, the Turks were in touch with all sides. This was a collective effort," Feltman told CNN.
Kerry, speaking to reporters in New Delhi, said the parties needed to find a way to address Israel's security concerns and to ensure that the people of Gaza could live in safety and dignity.
"All the people involved in this have strong demands and strong visions on what the future should look like. Israel has to be able to live in peace and security, without terror attacks and rockets and tunnels and sirens going off," Kerry said.
"And Palestinians need to be able to live with the opportunity to educate their children and move freely and share in the rest of the world and lead a life that is different from the one they have long suffered," he added. (Additional reporting by Ari Rabinovitch, David Brunnstrom in New Delhi; Lesley Wroughton in Washington; Michelle Nichols at the United Nations; and Omar Fahmy in Cairo; Writing by Jeffrey Heller in Jerusalem; Editing by Giles Elgood)