CAIRO (AP) — Israel and the Hamas militant group on Sunday accepted a renewed Egyptian cease-fire proposal, clearing the way for the resumption of talks on a long-term truce meant to end a month of heavy fighting in the Gaza Strip that has taken nearly 2,000 lives.
The announcement marked the second time in less than a week that the bitter enemies had agreed to Egyptian mediation. A similar 72-hour truce last week collapsed in renewed violence over the weekend.
In Cairo, the Egyptian Foreign Ministry said the truce would take effect at midnight (2101 GMT) and would create the atmosphere to resume humanitarian aid to the battered Gaza Strip and allow for indirect talks on a more lasting and comprehensive deal.
Hamas is seeking an end to a painful Israeli-Egyptian blockade on Gaza, while Israel wants Hamas to dismantle its formidable arsenal of rockets and other weapons.
Palestinian negotiators, who had been meeting with Egyptian officials throughout the weekend, said early Sunday that they accepted the proposal. Later Sunday, Israeli officials announced their agreement. Both Israeli and Palestinian delegations are back in Cairo.
Qais Abdelkarim, a member of the Palestinian delegation, said indirect talks with the Israelis would begin on Monday morning.
‘‘We are going to engage in serious talks in the 72 hours to end the blockade and deliver humanitarian materials into Gaza with the hope of reaching a lasting cease-fire,’’ he said. The goal, he added, was to end the blockade, which he called ‘‘the reason for the war.’’
The Egyptian-mediated talks are aimed at reaching a long-term arrangement following the heaviest fighting between Israel and Hamas since the Islamic militant group took control of Gaza in 2007.
In nearly a month of fighting, more than 1,900 Palestinians were killed, including hundreds of civilians. Nearly 10,000 were wounded and thousands of homes were destroyed. Sixty-seven people were killed on the Israeli side, including three civilians.
The fighting ended in a 72-hour cease-fire last Tuesday, during which Egypt had hoped to mediate a long-term deal. But when the three-day window expired, militants resumed their rocket fire, sparking Israeli reprisals. The violence continued throughout the weekend, including a burst of fighting late Sunday ahead of the expected cease-fire.
The Israeli military reported some 30 rocket attacks out of Gaza, while Palestinian medical officials said seven people were killed in Israeli airstrikes, all on Sunday. Among the dead was the bodyguard of a Hamas leader, the medical officials said.
Israel had walked away from cease-fire talks over the weekend, after militants resumed their rocket fire. ‘‘Israel will not negotiate under fire,’’ Prime Minister Benjamin Netanyahu said earlier Sunday, warning that his country’s military campaign ‘‘will take time.’’
Last week’s talks failed in part because Israel rejected Hamas’ maximalist demand for a complete end to the blockade. Israel says the closure is a necessary security measure, and officials do not want to make any concessions that would allow Hamas to declare victory.
A senior Palestinian negotiator acknowledged that the Palestinians would make more modest demands this time around. He said they will seek an end to the bloodshed in Gaza, internationally backed efforts to rebuild and an easing — but not an end — to the blockade.
‘‘We might not get everything we want, particularly on freedom of movement. But we believe the Israelis and the world have gotten the point that Gazans should live normally and things should be much better than today,’’ said the negotiator, speaking on condition of anonymity because he was discussing internal Palestinian deliberations.
Israel says the blockade is needed to prevent arms smuggling and that Hamas must disarm. Hamas has said handing over its arsenal, which is believed to include several thousand remaining rockets, is out of the question.
The blockade has greatly limited the movement of Palestinians in and out of the impoverished territory of 1.8 million people for jobs and study abroad. It has also limited the flow of goods into Gaza, and blocked virtually all exports.
An Egyptian crackdown on smuggling tunnels along Gaza’s southern border has made things even tougher by robbing Hamas of its key economic pipeline and weapons conduit. Gaza’s unemployment rate is above 50 percent and Hamas is unable to pay the salaries of tens of thousands of workers.
An easing of the blockade would mean an increased role for Western-backed Palestinian President Mahmoud Abbas, whose forces were ousted by Hamas seven years ago. Officials said that the rival Palestinian factions were already exploring options that would give Abbas, who now governs in the West Bank, a foothold in Gaza, including the likely control of its border crossing with Egypt.
Azzam Al-Ahmad, the head of Palestinians delegation, said ‘‘the reconstruction and the running of the crossings will be run under the PA (Palestinian Authority) government.’’ He did not elaborate.
Hamas spokesman Ihab Ghussein said they agreed to a 72-extension of the cease-fire to give a chance to negotiations. Without agreeing to Hamas demands though he said ‘‘there will be a true continuation of the resistance.’’
At a minimum though, Israel will want guarantees that the rocket fire will stop. A 2012 cease-fire promised an easing of the blockade, but was never implemented — in part because of sporadic rocket attacks by various armed factions in Gaza.
Israeli Justice Minister Tzipi Livni said Hamas could get the blockade lifted by accepting longstanding international demands to renounce violence and recognize Israel’s right to exist.
‘‘They want to get legitimacy as a terrorist organization, without accepting the requirements of the international community,’’ she told a news conference.
The current Gaza war escalated from the abduction and killing of three Israeli teens in the West Bank in June. Israel blamed the killings on Hamas and launched a massive arrest campaign, rounding up hundreds of its members in the West Bank, as Hamas and other militants unleashed rocket fire from Gaza.
On July 8, Israel launched an air campaign on the coastal territory, sending in ground troops nine days later to target rocket launchers and cross-border tunnels built by Hamas for attacks inside Israel.
In the West Bank, Palestinian health officials said an 11-year-old boy was shot and killed by Israeli forces in a refugee camp near the city of Hebron.
Witnesses and relatives of the boy said Israeli security forces opened fire at Palestinian stone-throwers. They said the boy was standing on the road in front of his home at the time.
The military said its forces encountered a ‘‘violent riot’’ and opened fire. It acknowledged that the boy was killed in the violence and said it was investigating.
Associated Press writers Josef Federman in Jerusalem, Sarah El Deeb in Cairo, Ibrahim Barzak in Gaza City, Gaza Strip, and Daniel Estrin and Yousur Alhlou in Jerusalem contributed to this report.