The Hamas militant group has said a ceasefire has been reached to end the latest round of fighting with Israel.

Hamas’ Al-Aqsa TV channel reported late on Thursday that a ceasefire has taken hold “on the basis of mutual calm”. It said the deal was mediated by Egypt and other regional players.

A senior Hamas official said the deal would formally go into effect at midnight.

He said the agreement merely ends the latest two-day burst of violence between Israel and Hamas.

He said Egypt would continue efforts to broker a long-term ceasefire. Hamas wants an end to a decade-long Israeli-Egyptian border blockade as a condition for any long-term deal.

Israeli airstrikesAn Israeli airstrike on the Said al-Mis’hal cultural center in Gaza City (Arafat Kareem/AP)

An Israeli official, speaking on condition of anonymity, denied a deal had been reached. But early on Friday, the situation in Gaza appeared quiet.

The Hamas announcement came shortly after Israeli prime minister Benjamin Netanyahu’s security cabinet ordered the army to take unspecified “strong action” against Gaza militants as the military reinforced units along the border.

Israel and Hamas have fought three wars since the Islamic militant group seized control of Gaza in 2007. In this week’s fighting, the Palestinian health ministry said three Palestinians, including a pregnant woman and her one-year-old daughter, and a Hamas militant, were killed in separate airstrikes. Israeli officials said seven people were wounded by rocket or mortar fire on the Israeli side.

Air raid sirens warning of incoming rocket fire wailed in southern Israel overnight and throughout the day, sending families scrambling into bomb shelters, cancelling outdoor summer cultural events and forcing summer camps indoors. The Israeli air force, meanwhile, attacked targets across Gaza.

A Palestinian rocket struck the southern city of Beersheba late in the afternoon, landing in an open area. It was the first time a rocket had hit the city since the 2014 war.

Gaza Strip Rubble after an airstrike in Mughraqa, central Gaza Strip (Adel Hana/AP)

Shortly after, an Israeli airstrike flattened the five-story cultural centre in the Shati refugee camp, a crowded district of Gaza City. The airstrike set off a powerful explosion and sent a huge plume of black smoke into the air, causing crowds to scream in panic. Medical officials said at least seven bystanders were wounded.

The building is home to a popular theatre and exhibits plays and other shows on a daily basis. An Egyptian-Palestinian cultural society also has an office in the building.

“The deliberate targeting of a cultural centre with airstrikes and destruction… is a barbaric act,” said Hazem Qassem, a Hamas spokesman. He said the destruction of the Egyptian cultural office was “an Israeli attempt to sabotage” the Egyptian ceasefire efforts.

The Israeli military said the building served as a Palestinian military installation. Hamas’ interior ministry, including its secret police, has offices in an adjacent site, but those offices were not hit.

Despite the animosity, the enemies have signalled, through their contacts with Egypt, that they want to avoid another war. Reaching a deal, however, will likely require major concession on both sides.

Hamas is demanding the lifting of an Israeli-Egyptian border blockade that has devastated Gaza’s economy, while Israel wants an end to rocket fire, as well as recent border protests and launches of incendiary balloons, and the return of the remains of two dead soldiers and two Israelis believed to be alive and held by Hamas.