Israel and Hamas have agreed to end their recent cross-border flare-up with a truce scheduled to begin just before midnight, according to Palestinian officials.
An Israeli strike flattened a building in Gaza City on Thursday after a rocket landed deep inside the Jewish state, but tensions appeared to lessen following a deadly flare-up of violence over the previous day.
Gaza militants had earlier Thursday declared a halt to rocket fire and the lack of a strong response to the strike on the building later in the day suggested they were returning to it.
A source familiar with the negotiations said Egypt and the United Nations had negotiated a return to calm starting shortly before midnight Thursday, seemingly bringing an end to the upturn in violence.
If confirmed, it would be the third such indirect truce agreement between Hamas and Israel in a month, with tensions remaining high.
Late Thursday, Israeli Prime Minister Benjamin Netanyahu's security cabinet issued a statement following a meeting saying it had instructed the military "to continue taking strong action against the terrorist elements".
More sirens rang out in southern Israel on Thursday night and there were reports in the Israeli media of at least two rockets landing in open areas.
First rocket to go 40km since 2014
The strike on the building in Gaza City wounded 18 Palestinians. The rocket that hit an open area outside the major Israeli city of Beersheba caused no damage or injuries.
It was the first time since a 2014 war that a rocket had hit that deep inside Israel, according to Israeli media. Beersheba is some 40 kilometres from the Gaza Strip.
Gaza militants had at around noon halted fire after targeting Israel with some 180 rockets and mortars beginning Wednesday night and into Thursday.
The rocket fire provoked a wave of Israeli strikes across the enclave overnight that killed three Palestinians, including a toddler.
It was the third major escalation since July and came despite attempts by UN officials and Egypt to secure a long-term truce between Israel and Hamas, the Islamist movement that runs the Gaza Strip.
The Israeli strike later Thursday, after the rocket landed near Beersheba, hit a building that Palestinians say housed a cultural centre and other offices in the middle of the city.
Israel's military said the five-storey building was used by Hamas's "interior security forces for military purposes."
The Said Meshal Cultural Centre confirmed on its Facebook page the offices in Gaza City had been destroyed, saying the building also hosted offices for the Egyptian community in Gaza.
The building was not publicly known to include facilities for Hamas.
Beginning on Wednesday night and into Thursday, fireballs and explosions shook the Gaza Strip while plumes of smoke rose from the enclave.
In nearby Israeli communities, residents were sent scrambling to bomb shelters.
Most of the rockets fired by Palestinian militants landed in open areas, but at least two hit the Israeli town of Sderot and sirens sounded throughout the night.
Medics reported at least four wounded taken to Israeli hospitals, including a seriously injured 30-year-old Thai woman.
Israel's military reported seven civilians wounded.
Those killed in the Gaza Strip included Enas Khammash, 23, and her 18-month-old daughter Bayan, according to the health ministry in the Hamas-controlled enclave.
They were killed in an air strike in Jafarawi in central Gaza, the ministry said, while her husband was injured. The ministry said Khammash was also pregnant.
A Hamas militant was also killed in the overnight strikes and at least 12 others injured, the health ministry said.
"Bayan was sleeping with her mother and father. The rocket hit their house and smashed it, you can see the damage," said Abdullah Khammash, 31 and a cousin of the woman and child killed.
In Sderot, the Israeli city near the Gaza Strip, a gaping hole could be seen in front of a small, three-storey building. A car parked nearby was smashed.
"I will never leave, never," said Hagit Shetreet, 45, who had to run to a shelter due to the rocket fire.
Israel's army said it targeted more than 150 Hamas military locations, including militant compounds and weapons manufacturing sites.
Military spokesman Jonathan Conricus said he had no information on the woman and child killed, but noted a pregnant Israeli woman was taken to hospital Wednesday night after a rocket landed nearby.
"What I can say is that we targeted by definition only military targets that were clearly used by Hamas where there was an active presence of Hamas and nothing else," he told journalists on Thursday morning.
The military said 30 of the some 180 rockets and mortars fired at Israel were intercepted by air defence systems.
The three flare-ups since July, which follow months of tensions due to protests and clashes along the Gaza border, have raised fears of a fourth war between the two sides since 2008.
Nickolay Mladenov, the UN envoy for the Middle East conflict who has been seeking to negotiate a long-term truce between Israel and Hamas, said he was "deeply alarmed".
Palestinian president Mahmud Abbas called on the international community to "immediately and urgently intervene".
Protests and clashes along the Gaza border began on March 30.
At least 165 Palestinians have killed by Israeli fire since then. One Israeli soldier has been shot dead by a Palestinian sniper.