Israeli special forces entered a building in the centre of Rafah where two hostages guarded by Palestinian Islamist Hamas forces were kept, and freed them under heavy fire, army spokesman Daniel Hagari said on Monday.
They are the first civilian hostages that Israeli soldiers have been able to free since the massacres on October 7, in which terrorists from Hamas and other extremist groups killed 1,200 people in Israel and took around 240 hostage.
The Israeli military had been preparing for the rescue for some time and was waiting for the right moment, Hagari said.
The two male hostages, aged 60 and 70, were being held on the second floor, Hagari said. Other militants were in neighbouring buildings, he added.
The security forces stood in front of the hostages to protect them and then engaged in a fierce exchange of fire. "This was a complex rescue operation under fire in the heart of Rafah, based on highly sensitive and valuable intelligence," Hagari wrote on Telegram.
Just one minute after the building was stormed Israel's air force began attacking the Rafah area to allow the forces to withdraw. The two hostages were evacuated from the building under heavy fire, said the Israeli army spokesman.
The two hostages were rescued as part of an operation that began with heavy IDF airstrikes in the Shaboura district in central Rafah, according to the Jerusalem Post.
In a statement earlier on Monday, the IDF said it "conducted a series of strikes on terror targets in the area of Shaboura in the southern Gaza Strip" overnight.
There were mixed reports on the death toll from the attack. The Hamas-controlled health authority reported at 67, with more than 160 injured from the operation. The Palestinian news agency Wafa reported, citing medical personnel in Rafah, at least 52 civilians and others were killed in the heavy Israeli airstrikes. Qatar-based broadcaster Al Jazeera reported that at least 63 died and dozens were injured.
The statements and tolls from both sides could not initially be independently verified.
The health authority in Gaza has put the overall death toll in the territory at more than 28,000 since the war began.
The two hostages were "both in good medical condition, and were transferred for medical examination at the Sheba Tel Hashomer hospital," the IDF said in a Telegram post.
Hagari said 134 people are still being held hostage in Gaza, though Israel sources said about 30 are no longer alive. An Israeli soldier had been rescued by the army at the end of October.
The rescue operation took place while Israel is preparing for a ground offensive in Rafah, which borders Egypt. Hundreds of thousands of civilians are currently sheltering there in a very confined space.
Israel's plans for a military offensive in the overcrowded city have met with strong international criticism.
Israel has already attacked targets in Rafah from the air on several occasions. Israeli Prime Minister Benjamin Netanyahu has argued that Israel could not win the war if Hamas battalions remained in Rafah.
The premier assured the hundreds of thousands of civilians seeking protection in Rafah of a "safe corridor" ahead of the planned ground offensive there.