RAFAH, OCCUPIED GAZA - Israel has launched a long-expected attack on Rafah, amid international concern over the number of civilians who sought shelter in the city during the war in Gaza.

On Tuesday the Israel Defence Forces (IDF) seized control of the Rafah border crossing between the Gaza Strip and Egypt as its tanks pushed into the southern city following a night of airstrikes.

The early morning invasion came just hours after Palestinians were celebrating the news that Hamas had accepted a ceasefire deal put forward by Egyptian and Qatari mediators after weeks of negotiations.

Israeli prime minister Benjamin Netanyahu’s office said the proposal was "far from Israel’s essential demands," but said it would send negotiators to continue efforts to reach an acceptable deal.

What were the terms of the deal?

Hamas said on Monday it had agreed to a three-phased deal for a ceasefire and hostages-for-prisoners swap.

Based on details announced by the Islamist militant group's officials, a copy of the proposal and an official briefed on the talks, here's what we know about the deal:

Phase one would include a 42-day ceasefire period and the release of 33 Israeli hostages (alive or dead) in exchange for Israel releasing 30 imprisoned women and children for each released Israeli.

Day one of the ceasefire would see intensive and sufficient quantities of humanitarian aid, relief materials, and fuel delivered to Gaza.

Hamas would release three Israeli hostages on the third day of the agreement, and then release three more hostages every seven days, prioritising women if possible, including civilians and conscripts.

After the first set of prisoners are released on day three, Israeli forces would completely withdraw from al-Rashid Street in northern Gaza, with all military sites to be dismantled. On day 22, Israeli forces would withdraw from the centre of the strip.

Phase two would see another 42-day period, including an agreement to restore "sustainable calm" to Gaza – language that an official said Hamas and Israel had earlier agreed on to take discussion of a "permanent ceasefire" off the table.

This next step would see the complete withdrawal of most Israeli troops from Gaza and the release of Israeli reservists and some soldiers in return for more Palestinian prisoners.

The third and final stage would see the completion of exchanging bodies and starting the implementation of reconstruction.

It would see an end to the complete blockade on the Gaza Strip and the implementation of a 3-5 year plan for reconstruction of the Gaza Strip under the supervision of a number of countries and organisations.

Joy turns to bombs

Palestinians were cheering in the streets of Rafah on Monday night after Hamas said it had accepted the proposed ceasefire deal.

Hours earlier, Israeli forces had ordered civilians in parts of the southern city to evacuate, ahead of what it described as a "limited" operation.

About 100,000 people were directed to head for an "expanded humanitarian area" in Khan Younis and al-Mawasi, but the international community still had grave concerns over the number of potential civilian casualties, with some 1.4 million Palestinians sheltering in Rafah.

However, any celebrations were soon muted as Israel rejected the terms of the ceasefire hours later, saying it would press ahead with its campaign in Rafah, beginning a night of airstrikes.

A Gaza border authority spokesperson said the Rafah crossing, a vital route for aid into the devastated enclave, was closed because of the presence of Israeli tanks.

Israeli Army Radio had earlier announced its forces were there. Red Crescent sources in Egypt said aid to Gaza had completely halted at Rafah and at the Israeli-controlled Kerem Shalom crossing.

What has Hamas said?

In a statement on Tuesday Hamas said Israel's incursion in the Rafah crossing was aimed at undermining ceasefire efforts.

It follows a statement the day before confirming that Hamas chief, Ismail Haniyeh, had informed Qatari and Egyptian mediators the group accepted their proposal for a ceasefire.

A Palestinian official close to mediation efforts told the Reuters news agency that a Hamas delegation may arrive in Cairo later on Tuesday or on Wednesday to discuss the ceasefire, following Israel's rejection.

One official said Hamas had agreed to the phased ceasefire and hostage release deal Israel proposed on 27 April, with only minor changes that did not affect the main parts of the proposal.

What has Israel said?

Prime minister Netanyahu's office said later the proposal fell short of Israel's demands but that they would send a delegation to meet with negotiators to try to reach an agreement.

Israeli rear admiral Daniel Hagari said: "We examine every answer and response in the most serious manner and are exhausting every possibility regarding negotiations and returning the hostages. In parallel, we are still operating in the Gaza Strip and will continue to do so."

Speaking on condition of anonymity on Monday, an Israeli official said the truce Hamas accepted was a "softened" version of an Egyptian proposal that included "far-reaching" conclusions that Israel could not accept.

They added: “This would appear to be a ruse intended to make Israel look like the side refusing a deal."

What happens next?

Talks are continuing, with a team of mid-ranking Israeli officials set to arrive in Cairo on Tuesday to assess whether Hamas can be persuaded to shift on its latest ceasefire offer, a senior official said on Tuesday.

"This delegation is made up of mid-level envoys. Were there a credible deal in the offing, the principals would be heading the delegation," the official said.

Mediator Qatar said its delegation would head to Cairo on Tuesday to resume indirect negotiations between Israel and Hamas.

A Hamas delegation is also expected to head to the Egyptian capital to continue talks.

Egypt warned on Tuesday that Israel's operation in Rafah represents a "dangerous escalation" that undermines ceasefire efforts.

Meanwhile, the European Union's foreign policy chief, Josep Borrell, said the assault would be deadly for civilians. He told reporters: "I am afraid that this is going to cause again a lot of casualties, civilian casualties. There are no safe zones in Gaza."

White House officials remained tight-lipped about its response to Hamas's acceptance of the ceasefire proposal, while refusing to provide any of its details. They asserted that the release of Israeli hostages remains one of its top priorities.

The United States and other foreign governments have been pressing Israel not to start a campaign in Rafah until it had drawn up a humanitarian plan for the Palestinians sheltering there.

Israel said the vast majority of people had been evacuated from the area of its planned military operations, having told them to go to what it calls an "expanded humanitarian zone" around 20 km (12 miles) away.

However, Gaza Border Crossing Authority spokesperson Hisham Edwan said: "The Israeli occupation has sentenced the residents of the Strip to death after closure of the Rafah border crossing."