Three Israeli soldiers have been killed in a Hamas rocket attack near one of the main crossings used to deliver aid into Gaza, Israel has said.

The Kerem Shalom crossing was closed overnight by Israel following the strike.

Subsequent Israeli strikes in the southern Gazan city of Rafah have reportedly killed at least 12 people.

Israel’s military said early on Monday it was urging Gazans sheltering in parts of Rafah to evacuate.

It comes as talks aimed at securing a ceasefire deal in Gaza and the release of hostages have stalled.

The Israeli Defense Forces (IDF) said 10 projectiles had been fired from an area near the Rafah crossing in southern Gaza, about 3.6km (2.2 miles) from Kerem Shalom.

Hamas’s armed wing claimed responsibility and said its target was a nearby Israeli army base.

They were fired from a site some 350m from a civilian shelter, the IDF said

It called the launches “another clear example of the terrorist organisation’s systematic exploitation of humanitarian facilities and spaces, and their continued use of the Gazan civilian population as human shields”.

Hamas denies it uses civilians as human shields.

The Israeli military confirmed a counter-strike in Rafah, saying it struck the launcher from which the projectiles were fired and a nearby military structure.

There were two Israeli strikes on Sunday, killing at least 12 people according to Gaza health officials.

The latest violence follows two days of talks with mediators in Cairo, Egypt.

There has been little progress, with both Israel and Hamas saying they will not give ground on key demands, but discussions are expected to resume on Monday.

Hamas said its delegation would travel to Qatar to consult with the group’s leadership.

CIA chief William Burns, who has also been involved in mediation efforts, has left the Egyptian capital for talks in Doha, according to reports.

The truce proposal is believed to involve a 40-day pause in fighting, allowing the release of hostages in Gaza and a number of Palestinian prisoners being held in Israeli jails.

Hamas said it viewed the current proposal in a “positive light”, but the main sticking point appears to be whether the ceasefire deal would be permanent or temporary.

The group is insisting any deal makes a specific commitment towards an end to the war, but Israel’s Prime Minister Benjamin Netanyahu rejected that on Sunday.

“The state of Israel cannot accept this [Hamas’s demands], we are not prepared to accept a situation in which the Hamas brigades come out of their bunkers, take control of Gaza again, rebuild their military infrastructure, and return to threatening the citizens of Israel in the settlements surrounding the southern mountains, in all parts of the country.

“This will be a terrible defeat for the state of Israel,” he added.

The war began after waves of Hamas gunmen stormed across Gaza’s border into Israel on 7 October, killing about 1,200 people and taking more than 250 hostages. The group is proscribed as a terrorist organisation by many Western countries.

During the subsequent Israeli military campaign in Gaza, more than 34,600 Palestinians have been killed and over 77,900 wounded, according to figures from the territory’s Hamas-run health ministry.

Mr Netanyahu has faced pressure from within his far-right coalition to press ahead with the long-promised offensive in Gaza’s southern-most city, Rafah, where an estimated 1.4 million people have taken shelter after fleeing fighting in northern and central parts of the strip.

The US is reluctant to back a military operation that could cause significant civilian casualties, and has insisted on seeing a plan to protect displaced Palestinians first.

Early on Monday, the IDF said it was encouraging residents in Rafah’s eastern neighbourhoods to make their way toward an “expanded humanitarian zone.”

“The expanded humanitarian zone includes field hospitals, tents and increased amounts of food, water, medicine and other supplies.

“In accordance with the approval of the government, an ongoing situation assessment will guide the gradual movement of civilians in the specified areas in eastern Rafah, to the humanitarian area,” a statement posted to X, formerly Twitter, read.

Seven months into its offensive against Hamas, Israel has said that victory is impossible without taking Rafah.

But with more than more than 1.4 million displaced Palestinians sheltering there, Western powers and neighbouring Egypt have raised fears that there could be high numbers of civilian casualties.