Hamas's armed wing claimed responsibility on Sunday for an attack on the Kerem Shalom crossing into Gaza that Israel said killed three of its soldiers.
Israel's military said 10 projectiles were launched from Rafah in southern Gaza towards the area of the crossing, which it said was now closed to aid trucks going into the coastal enclave. Other crossings remained open.
Hamas' armed wing said it fired rockets at an Israeli army base by the crossing, but did not confirm where it fired them from. Hamas media quoted a source close to the group as saying the commercial crossing was not the target.
More than a million Palestinians are sheltering in Rafah, near the border with Egypt.
Shortly after the Hamas attack, an Israeli airstrike hit a house in Rafah killing three people and wounding several others, Palestinian medics said.
The Israeli military confirmed the counter-strike, saying it struck the launcher from which the Hamas projectiles were fired, as well as a nearby "military structure".
"The launches carried out by Hamas adjacent to the Rafah Crossing ... are a 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," it said.
Hamas denies it uses civilians as human shields.
Just before midnight, an Israeli air strike killed nine Palestinians, including a baby, in another house in Rafah, Gaza health officials said. They said the new strike increased the death toll on Sunday to at least 19 people.
Israel has vowed to enter the southern Gaza city and flush out Hamas forces there, but has faced mounting pressure to hold fire as the operation could derail fragile humanitarian efforts in Gaza and endanger many more lives.
Sunday's attack on the crossing came as hopes dimmed for ceasefire talks under way in Cairo.
The war began after Hamas stunned Israel with a cross-border raid on Oct. 7 in which 1,200 people were killed and 252 hostages taken, according to Israeli tallies.
More than 34,600 Palestinians have been killed, 29 of them in the past 24 hours, and more than 77,000 have been wounded in Israel's assault, according to Gaza's health ministry.