Palestinian militant groups in the Gaza Strip have announced an Egyptian-brokered ceasefire with Israel.

It comes after a severe escalation of violence threatened to descend into full-blown conflict.

The groups, including Hamas, issued a joint statement saying they would abide by the ceasefire as long as Israel did the same. Israel has not commented on the announcement.

"Egypt's efforts have been able to achieve a ceasefire between the resistance and the Zionist enemy," the statement said.

"The resistance will respect this declaration as long as the Zionist enemy respects it."

The violent escalation between Israel and Palestinian militants in Gaza was the worst since a 2014 war.

Seven Palestinians were killed in Gaza over the course of 24 hours as Israeli strikes targeted militants and flattened buildings.

Sirens wailed in southern Israel and tens of thousands of residents took cover in shelters overnight as around 400 rockets and mortar rounds were fired from the Gaza Strip, wounding 27 people, including three severely.

The violence began last Sunday with a botched Israeli special forces operation inside the Gaza Strip that turned deadly and prompted Hamas to vow revenge.