Gaza’s Hamas-run health ministry said dozens of bodies have been found and locals said nearby areas were razed.
The Israel Defense Forces (IDF) said it had killed 200 “terrorists”, detained hundreds more and found weapons and intelligence “throughout the hospital”.
The IDF said it raided al-Shifa because Hamas had regrouped there.
The two-week operation saw intense fighting and Israeli air strikes in nearby buildings and the surrounding area.
Wards were attacked because Hamas and Palestinian Islamic Jihad operatives were using them as a base, the IDF said, accusing them of fighting inside medical departments, setting off explosives and burning hospital buildings.
Images published following the Israeli withdrawal showed Palestinians walking near the charred main buildings with chunks of wall missing and carrying bodies wrapped in blankets. Graphic photos showed corpses partially exposed on the churned ground.
The health ministry said dozens of bodies, some decomposed, had been found in and around the medical complex which was now “completely out of service”.
A doctor told AFP news agency more than 20 bodies had been recovered, some crushed by withdrawing vehicles.
A spokesperson for Gaza’s Hamas-run civil emergency service said Israeli forces had used bulldozers to dig up the grounds of the complex and exhume buried bodies.
The Hamas government media office said Israeli forces had killed 400 Palestinians in al-Shifa and the surrounding area, including a female doctor and her son, who was also a doctor. Israel has not yet commented.
The IDF said its troops killed 200 “terrorists” and detained more than 900 people, of whom more than 500 were subsequently found to be affiliated with Hamas and Palestinian Islamic Jihad – which Israel, the UK and other countries proscribe as terrorist organisations. The suspects had been transferred to the intelligence services for further interrogation, it added.
The IDF said “forces found large quantities of weapons, intelligence documents throughout the hospital, encountered terrorists in close-quarters battles and engaged in combat while avoiding harm to the medical staff and patients”.
An IDF spokesman said more than 6,000 people had been in the hospital complex, mostly civilians, at the start of the raid.
The World Health Organization (WHO) said on Sunday night that 21 patients had died, with patients moved multiple times and held without medical care.
Patient Barra al-Shawish told Reuters news agency that the Israeli troops had allowed in a “very small amount of food”. “No treatment, no medicine, nothing, and bombing for 24 hours that didn’t stop and immense destruction in the hospital,” he said.
Some of the patients were being moved to al-Ahli hospital, about 3km (1.8 miles) to the south-east, a medic at al-Shifa told Reuters.
Gaza’s hospitals have been a main focus of the current war, with thousands of Palestinians seeking shelter from Israeli bombardment in their grounds and Israeli forces storming the facilities because they say Hamas fighters are present there.
Israel has long accused Hamas of using civilian health infrastructure as a cover to launch its operations, which the group denies.
Two weeks ago, it took hundreds of Israeli forces just a few hours to approach and enter the Gaza Strip’s largest hospital. That was in marked contrast to their first controversial raid there in November, when it took several weeks for large numbers of tanks and vehicles backed by heavy air strikes to close in on the site.
For supporters of the Israeli military this has been evidence of the gains it has made during the war and its tactical success, launching a surprise attack on the enemy to strike it hard. An IDF spokesman previously referred to the operation as “one of the most successful of the war so far” because of the intelligence gleaned as well as numbers killed and detained.
However, some commentators suggest the second al-Shifa raid highlights flaws in Israel’s military strategy for the war. They argue that it shows the ease with which Hamas and Palestinian Islamic Jihad fighters were able to regroup after Israel pulled its forces out of northern Gaza and the urgent need to come up with a convincing post-war plan to govern the territory.
On Monday the Gaza health ministry appealed for international help to restart medical care at Nasser hospital in the southern Gaza city of Khan Younis. The biggest hospital in southern Gaza has been out of action since the Israeli military stormed it in February.
The war began when Hamas fighters stormed into southern Israel on 7 October, killing about 1,200 people and seizing 253 hostages, according to Israeli tallies. About 130 of the hostages remain in captivity, at least 34 of whom are presumed dead.
More than 32,800 Palestinians have been killed and 75,000 injured in Gaza since Israel launched its military campaign, according to the Hamas-run health ministry. It says 70% of those killed were women and children.