The United States said Monday Israel must make every possible effort to avoid civilian casualties, following a deadly strike that hit a displacement camp in Rafah, which Gaza's health ministry said killed 45 people.

Israel is facing a wave of international condemnation over the strike, both across the region and from the European Union, France and the United Nations.

"As we've been clear, Israel must take every precaution possible to protect civilians," a US National Security Council spokesperson said in a statement.

"We are actively engaging the IDF and partners on the ground to assess what happened," the spokesperson added.

Gaza's civil defense agency said the strike ignited a fire that tore through a displacement center in northwestern Rafah near a facility of the UN agency for Palestinian refugees.

"The devastating images following an IDF strike in Rafah last night that killed dozens of innocent Palestinians are heartbreaking," the NSC spokesperson said.

The Israeli military said it had launched a probe into the strike which it said was carried out based on "precise intelligence information" about two Hamas militants who it said were killed.

It launched the attack on Rafah hours after Hamas unleashed a barrage of rockets towards the Tel Aviv area, most of which were intercepted.

The NSC spokesperson said that "Israel has a right to go after Hamas, and we understand this strike killed two senior Hamas terrorists who are responsible for attacks against Israeli civilians," before imploring more caution.

The Gaza war broke out after the October 7 Hamas attack on southern Israel resulted in the deaths of more than 1,170 people, mostly civilians, according to an AFP tally based on Israeli official figures.

Israel's retaliatory offensive has killed at least 36,050 people in Gaza, mostly civilians, according to the territory's health ministry.