(CNN) -- After more than seven weeks of heavy fighting, Israel and Hamas announced a ceasefire Tuesday. And unlike the other ceasefires announced in recent weeks, this one has no expiration date.
The truce does not deal with core long-term issues on both sides. But Israel agreed to ease the blockade on Gaza, open border crossings for more aid to pass through and extend the fishing limit off the coast to 6 miles, according to a senior Egyptian government official.
Both sides agreed to return to Cairo for further talks, the official said.
Hamas -- as it has after every battle with Israel -- declared it a victory. But Israel said that Hamas finally accepted the offer that it had rejected repeatedly.
"We hope that this time, the ceasefire will stick," Israeli government spokesman Mark Regev said.
"And I think now, as the dust will begin to clear, many people will be asking: Why is it that today Hamas accepted the very same Egyptian framework that it rejected a month ago?
"Ultimately, so much bloodshed could have been avoided," he added.
Early in the conflict, Israel openly accepted Egypt's ceasefire proposal and slammed Hamas for not doing so. Analysts saw Egypt's offers as one of many signs that the fighting was a proxy war for the broader Middle East, with key powers such as Cairo supporting Israel's fight against Hamas.
In Gaza, cheers and celebratory gunfire erupted Tuesday.
It's "a day of the victories for our people," spokesman Fawhi Barhoum declared before a cheering, screaming crowd. He praised the "steadfastness and resistance" in Gaza.
"The occupiers have tried to break them ... but the delegation spoke with one voice," Barhoum said of the negotiations.
Palestinian President Mahmoud Abbas, who is not part of Hamas and lives in the West Bank, thanked "Egypt and everyone who supported all the efforts that resulted in this agreement to end the aggression."
"Together, we will rebuild our free country," he added.
Abbas is with the Palestinian faction Fatah, the longtime rival of Hamas, which has run the government in the West Bank. The two factions have battled and kidnapped each other's militants in the past but also repeatedly announced plans for a unity government, including one this year.
The ceasefire went into effect at 7 p.m. (noon ET).
"In the end, Israel had two alternatives: either to occupy Gaza and destroy Hamas or to go to a ceasefire," a senior Israeli official said on condition of anonymity. "Once we decided not to occupy Gaza, we pushed for the same conditions that led to the end of hostilities in 2012."
He said that he was "not confident" the ceasefire would last but that if Hamas wants it to hold, it will.
Israel has said its military actions destroyed dozens of tunnels used by Palestinian militants to smuggle weapons used to attack Israeli civilians.
One airstrike last week killed three high-ranking Hamas militants.
Hamas later killed 18 of its own, accusing them of being informants for Israel.
As news of the possible deal broke Tuesday, a flurry of violence was reported. Warning sirens blared in southern Israel, indicating rocket attacks from Gaza. Israeli emergency services reported that one person was critically wounded and two others were seriously wounded.
Separately, three Palestinians were killed in an Israeli airstrike in Rafah, south of Gaza City, according to Ashraf el-Qedra, spokesman for the Palestinian Ministry of Health.
50 days into Israeli operation
U.S. Secretary of State John Kerry cheered news of the ceasefire Tuesday and called on all parties to comply with its terms.
He also expressed some skepticism.
"We are approaching the next phase with our eyes wide open. We have been down this road before, and we are all aware of the challenges ahead. Both the Israelis and the Palestinians have strong views about their needs and the future of the region," Kerry said in a statement.
"Getting there will not be easy, but it is the only path to a future that the people on both sides deserve," it read.
The ceasefire came on the 50th day of Israel's Operation Protective Edge, aimed at stopping rocket attacks against Israeli civilians and weeding out the militants' tunnels.
More than 2,130 Palestinians have been killed in the conflict. It's not clear how many were civilians. The United Nations estimates that more than 70% were civilians, but Israel reports a higher number of militants among the dead.
On Sunday, the Israel Defense Forces accused Hamas of routinely exaggerating civilian deaths "for propaganda purposes."
Sixty-seven Israelis -- 64 of them soldiers -- have been killed, the United Nations reports. A foreign worker in Israel was killed as well.
A 4-year-old boy became Israel's latest civilian victim Friday when a mortar shell exploded in the parking lot of a kibbutz, Israeli rescue services said.
On Monday night, Israel blasted a second residential tower in Gaza. The Health Ministry said 20 people were injured in the airstrike.
The Israeli military said the building housed a Hamas "command and control center." Palestinians evacuated the building after warnings from Israel, the IDF said.
Hamas acknowledges militants killed teens
Israel's operation followed the June abductions and killings of three Israeli teenagers who were on their way home from school in the West Bank. At the time, Israel blamed Hamas.
On Friday, a Hamas official admitted that the act was carried out by Hamas militants. The official said the attackers did not tell their leaders.
After the boys were buried, a Palestinian teen was killed. Israeli authorities arrested the suspects, saying it was believed to have been a revenge killing.
"Any peace effort that does not tackle the root causes of the crisis will do little more than set the stage for the next cycle of violence," a spokesman for the U.N. secretary-general said Tuesday of the ceasefire.
"After 50 days of profound human suffering and devastating physical destruction, any violations of the ceasefire would be utterly irresponsible," he said.