Five Palestinians have been killed in shelling after Israel ended a humanitarian ceasefire in the Gaza Strip, medics said.

In a statement on Sunday the Israeli military attributed its decision to resume aerial, naval and ground activity to "Hamas's incessant rocket fire throughout the humanitarian window, which was agreed upon for the civilian population in Gaza".

Smoke was seen billowing over several locations in Gaza shortly after the Israeli announcement.

The Gaza Ministry of Health said two Palestinians were killed in Nusairat refugee camp in the central area of the Strip and three others in Khan Younis in the south. The death toll now stands at more than 1,000.

Al Jazeera's Nicole Johnston, reporting from Gaza City, said there was tank shelling in the east of the Strip, and naval ships pounded the beaches in the west. There were also several air strikes.

An air strike in central Gaza City hit al-Shoroq building, which houses foreign and local media, including Hamas-affiliated al-Aqsa TV. The media offices were evacuated earlier this week.

Earlier on Sunday, Palestinian fighters resumed rocket attacks into Israel, firing 20 rockets overnight and into the morning. Air-raid sirens sounded throughout southern and central Israel during morning rush hour.

At least five rockets landed in Israel and two others were intercepted by the Iron Dome missile defence system, the Israeli military said.

The UN had asked Palestinian factions in Gaza to accept a 24-hour-long ceasefire extension, following Israel's approval to prolong the humanitarian truce for another day.

Israel said, however, that it would continue to target tunnels used by Hamas and other groups.

Hamas rejected the Israeli offer as unacceptable because it did not include a provision for the withdrawal of Israeli troops and for residents in Gaza to return to their homes.

Sami Abu Zuhri, a Hamas spokesman in Gaza, told Al Jazeera: "Any humanitarian ceasefire that doesn't include the complete withdrawal of its positions in the Gaza Strip, doesn't enable the residents to go back to their homes and doesn't allow the evacuation of the wounded, is unacceptable."

Israel's security cabinet had earlier approved extending the ceasefire, which begun early on Saturday, until midnight local time (21:00 GMT) on Sunday.

"At the request of the United Nations, the cabinet has approved a humanitarian hiatus until tomorrow [Sunday] at 24:00. The IDF [Israel Defence Forces] will act against any breach of the ceasefire," an Israeli official said in a statement.

After the ceasefire began early on Saturday, Palestinians in Gaza took advantage of the lull in fighting to retrieve their dead and stock up on food, flooding into the streets to discover scenes of massive destruction in some areas.

At least 1,054 Palestinians, mostly civilians, have been killed and more than 6,000 injured since Israel launched its offensive on the Mediterranean enclave, home to 1.8 million Palestinians, on July 8.

Israel said five more of its soldiers were killed in pre-truce fighting in Gaza and two others died of their wounds in hospital.

Another soldier was killed by shell fire overnight, bringing the army death toll to 43.

Three civilians, including two Israeli citizens and a Thai labourer, have been killed by rockets fired from Gaza.