Israel and Hamas on Tuesday agreed to an open-ended cease-fire, bringing to a halt the 50-day conflict that’s seen bloodshed on both sides.

An Israeli official told the Associated Press that Israel had “responded positively” to Egypt’s call for a cease-fire. Local media reported it was to go into effect at 7 p.m. local time.

A bomb technician stands on the roof of a damaged house in the Israeli coastal city of Ashkelon, 8 miles from the border with the Gaza Strip, after it was hit by a rocket launched from Hamas militants in the Palestinian enclave on August 26, 2014. Egypt has proposed a new ceasefire in the Gaza conflict that would open key border crossings into the battered Palestinian territory. (Photo: David Buimovitch/AFP/Getty Images)

A bomb technician stands on the roof of a damaged house in the Israeli coastal city of Ashkelon, 8 miles from the border with the Gaza Strip, after it was hit by a rocket launched from Hamas militants in the Palestinian enclave on August 26, 2014. (David Buimovitch/AFP/Getty Images)

In the hours leading up to the truce, Palestinian militants bombarded Israel with rockets, sending Israelis to shelters in southern and central Israel, including Tel Aviv, its largest city. One Israeli man was killed during a barrage on southern Israel two hours before the cease-fire was to take effect.

Hamas labeled the seven-week conflict a “victory of the resistance.”

“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 told reporters at Gaza’s Shifa Hospital, the AP reported.

AFP reported from Gaza that thousands of Palestinians flooded the streets on news of the truce, among them Hamas gunmen who fired into the air in celebration. Mosques broadcast chants of “Allah akbar,” or “God is greatest.”

The unnamed Israeli official told the AP that Israel agreed to ease its blockade of Gaza to allow more humanitarian and construction materials in. Israelis were stunned to learn during the operation that Hamas had dug a sophisticated network of tunnels using concrete that had been allowed into the seaside strip and intended for civilian development projects. During the conflict, heavily armed militants used the tunnels to infiltrate into Israel and kill Israeli soldiers.

Israeli security sources told the Israeli newspaper Ma’ariv that Hamas had planned a spectacular terrorist attack using more than 30 of the tunnels to kidnap and kill as many Israelis as possible using their guns, plastic handcuffs and tranquilizers in towns bordering Gaza.

Reports quoting Israeli and Palestinian officials said that further talks would occur next month in Cairo, presumably to discuss Hamas demands for a seaport and prisoner releases and Israeli demands that Hamas be demilitarized.

The Israeli military on Tuesday said that Hamas and other Palestinian militant groups had fired 4,450 rockets at Israeli communities during the past 50 days. More than 70 rockets were launched on Tuesday alone.

More than half a dozen negotiated short-term cease-fires were violated by Hamas or other Palestinian militant groups by shooting rockets and mortars into Israel.

Despite the news of the cease-fire, Israeli Prime Minister Benjamin Netanyahu had a political challenge ahead, with half of his cabinet ministers opposed to the terms of the deal, Israel’s Channel 2 reported.