Live updates: Follow the latest news on Israel-Gaza
US President Joe Biden offered strong support for Israel as thousands across the Middle East protested against mounting civilian deaths in Gaza.
Speaking in Tel Aviv a day after about 500 died in a strike on Al Ahli Arab Hospital, Mr Biden said freeing Israeli hostages remained among his top priorities.
He earlier said he had seen evidence that suggested Israel was not behind the blast, which he attributed to “the other team”.
Israel claims Palestinian Islamic Jihad fired a missile that crashed into the hospital, killing 471 people and injuring more than 300, according to the Gaza Health Ministry.
Mr Biden offered limited criticism of Israel's bombing campaign that has left 3,400 Palestinians dead, though he did tell Benjamin Netanyahu's government they must act according to the “rule of law”.
About 1,400 Israelis have been killed since the war began.
Mr Biden urged Israelis not to be consumed by rage and said the vast majority of Palestinians were not affiliated with Hamas.
“If you give up the rule of law then you let the terrorists win,” he said.
A separate post on X, formerly Twitter, said he had “asked tough questions as a friend of Israel”.
Mr Biden used much of his speech to express his horror over the killing of Israelis at a music festival and kibbutz.
"Hamas committed atrocities that recall the worst ravages of ISIS, unleashing pure unadulterated evil upon the world," Mr Biden said.
"There is no rationalising it, no excusing it."
“I can't speak publicly about all the details, but let me assure you for me as the American president, there's no higher priority than releasing all these hostages.
"We’re working with partners throughout the region, pursuing every avenue to bring home those who are being held captive by Hamas."
Israel's military has said Hamas is holding 199 hostages in Gaza while the Palestinian group's armed wing, the Ezzedine Al Qassam Brigades, claimed they are holding between 200 and 250.
Mr Biden warned others against thinking of attacking Israel.
"And my message to any state or any other hostile actor thinking about attacking Israel remains the same as it was a week ago: Don’t. Don’t. Don’t," he said.
Israeli President Isaac Herzog's office said he had told Mr Biden: “God bless you for protecting the nation of Israel”.
Mr Netanyahu thanked Mr Biden for his “unequivocal support”.
After his talks with Mr Netanyahu’s war cabinet, Mr Biden held a meeting with Israeli survivors of the October 7 rampage.
He hugged retired grandmother Rachel Edri, who was held hostage at gunpoint in her home for 20 hours by Hamas. She claimed to use food and conversation to stall them until their capture.
$100 million aid for Gaza
“Please keep supporting us in eliminating Hamas once and for all,” a soldier told Mr Biden.
Mr Biden announced $100 million from the US in humanitarian assistance for Gaza and the occupied West Bank and said aid groups must be allowed access to civilians.
“Palestinian people are suffering greatly as well,” he said.
“The entire world was outraged and saddened by the enormous loss of life in the hospital in Gaza.
“Separately, I ask Israel that the global community demand that the International Red Cross be able to visit hostages.
“I'm also announcing $100 million in new US funding for humanitarian assistance in both Gaza and the West Bank.
"This money will support more than 1 million displaced in conflict-affected Palestinians, including emergency needs in Gaza.”
As he returned home on Air Force One from Israel, Mr Biden said Egyptian leader Abdel Fattah El Sisi has agreed to open the Rafah border crossing into Gaza to allow in 20 lorries with humanitarian aid.
Mr El Sisi "agreed to … let up to 20 trucks through to begin with", Mr Biden told reporters.