Israel and Hamas, the Islamist group that rules the Gaza Strip, are reported to have agreed a truce.

Two Palestinian officials told Reuters that the agreement would end an escalation in fighting that has drawn mutual threats of war.

There was no formal comment, but an Israeli official who spoke on condition of anonymity denied a cease-fire had been reached. Israel rarely acknowledges reaching any such agreement with Hamas, a group it designates as a terrorist organization and with whom it has fought three wars in the past decade.

A surge in cross-border rockets and air strikes in recent weeks have prompted the United Nations and Egypt to try to broker a truce to prevent another all-out conflict.

On Wednesday night and Thursday, Israeli aircraft struck more than 150 targets in Gaza and Palestinian militants fired scores of rockets including a long-range missile deep into Israel, escalating fighting despite the ongoing truce talks.

"Egyptian efforts managed to restore calm between Palestinian factions and Israel that will end the current escalation," a Palestinian official, who also spoke on condition of anonymity, said.

"Palestinian factions will respect calm as long as Israel does," he told Reuters.

Abu Mujahed, spokesman of the Popular Resistance Committee, a smaller faction in Gaza, said on his Facebook page: "Upon Egyptian and international efforts, a ceasefire between Palestinian resistance began conditional on the commitment of the occupation."

Hours earlier, after the long-range Palestinian missile attack, the first of its kind since the 2014 war, Israeli airstrikes had resumed after a short lull, flattening a multi-storey building that the Israeli military described as a Hamas headquarters.

A pregnant Palestinian woman and her 18-month-old child were killed in the Israeli attacks overnight on Wednesday, as was a Hamas militant, Gaza medical officials said.

The Israeli military said seven people were wounded by Palestinian rockets and mortars that hit southern Israel.

It said its aircraft had struck more than 150 Hamas targets overnight, while more than 180 Palestinian rockets and mortars hit southern Israel.   

Israeli Army Radio said Palestinian militants had fired a Grad missile capable of reaching Israel's heartland.

Israel responded by hitting the multi-storey building, first with small bombs apparently so that people would evacuate, then flattening it with a huge blast that shook the city and raised clouds of dust and smoke.

Residents said the building had served mainly as a cultural centre. Local health officials said 18 bystanders were wounded by the blast. Hamas denied using the facility.

Israeli Prime Minister Benjamin Netanyahu convened his security cabinet late into the night on Thursday. A statement issued by his office before reports a truce had been reached said the forum instructed the military to "keep acting with force against the terrorists".

Yuval Steinitz, a member of Netanyahu's security cabinet, told Israel Radio earlier that Israel was "not eager for war" but would make no concessions to Hamas.   

The US State Department condemned the launching of missile attacks into Israel.
"We've seen reports that 180 or so rocket attacks have taken place, shot from Gaza into Israel, and we fully support Israel's right to defend itself and to take actions to prevent provocations of that nature," State Department spokeswoman Heather Nauert said.

Egypt and the United Nations have been trying to mediate a comprehensive cease-fire to prevent an escalation in fighting and to ease the deep economic hardship in Gaza.

UN Middle East envoy, Nickolay Mladenov said the United Nations had engaged with Egypt in an "unprecedented effort" to avoid serious conflict, but "the situation can rapidly deteriorate with devastating consequences for all people."