The airstrikes caused panic in Rafah.
Residents said it included gunfire from Apache helicopters and naval vessels. At least two mosques and more than a dozen houses were reported to have been hit.
Shortly afterwards, Israel announced it had carried out a special forces operation to free two Israeli hostages being held on the second floor of a residential building in Rafah .
The men, aged 60 and 70, are said to be in good medical condition.
This is a small but symbolically significant success in Israel’s quest to rescue more than 100 captives held by Hamas, which is one of the goals of its punishing military campaign in Gaza.
But Israel’s allies have warned that its aim to send ground forces into Rafah would be a disaster for more than one million displaced people sheltering there.
The US President Joe Biden told Israel’s prime minister there must be a credible and executable plan to protect them.