MIAMI — Former President Donald Trump has accused Israeli Prime Minister Benjamin Netanyahu of betraying him just before the U.S. killed a top Iranian general in 2020 and is questioning the country’s intelligence prowess as it responds to Hamas’ deadly attack.

Trump’s comments at a West Palm Beach, Florida, rally on Wednesday were quickly denounced by one of Netanyahu’s allies, the White House and several Republican presidential rivals, including Florida Gov. Ron DeSantis.

Most American leaders, including the Republican presidential contenders, have lined up behind Israel after the Hamas invasion that President Joe Biden said was the deadliest day for Jews since the Holocaust. At least 2,700 people have died on the Israeli and Palestinian sides.

But Trump, the early front-runner for the GOP presidential nomination who has long tried to paint himself as a fierce defender of Israel, offered stark criticism Wednesday night. He told the crowd that his prayers were with Israel and again vowed to stand by it and its bid to destroy Hamas — before he went on to describe a “bad experience” with Israel’s leaders.

“Israel was going to do this with us, and it was being planned and working on it for months,” he said about the coordination to kill Gen. Qassem Soleimani, the head of Iran’s Quds Force. “We had everything all set to go, and the night before it happened, I got a call that Israel will not be participating in this attack.”

“Nobody’s heard this story before,” Trump said. “They didn’t tell us why.”

“I’ll never forget that Bibi Netanyahu let us down,” he said.

“We were disappointed by that. Very disappointed,” he said. “But we did the job ourselves, with absolute precision … and then Bibi tried to take credit for it.”

Trump also pointed to intelligence failures ahead of last weekend’s onslaught, which caught Israel by surprise, saying the country had to “strengthen themselves up.”

“They’ve got to straighten it out because they’re fighting, potentially, a very big force,” he said. “They’re going to have to step up their game.” He further criticized Israel’s defense minister, Yoav Gallant, calling him “this jerk” for warning Hezbollah not to attack Israel from the north.

Trump repeated his criticism of Netanyahu and his government in a radio interview that aired Thursday.

“He was not prepared and Israel was not prepared,” Trump told Fox News host Brian Kilmeade. “Who would have thought their intelligence wouldn’t have been able to pick this up? Thousands of people were involved. Thousands of people knew about it, and they let this slip by.”

Netanyahu’s office did not immediately respond to a request for comment. But the government’s communications minister, Shlomo Karhi, told Israel’s Channel 13 that it was “shameful that a man like that, a former U.S. president, abets propaganda and disseminates things that wound the spirit of Israel’s fighters and its citizens.”

“We don’t have to bother with him and the nonsense he spouts,” Karhi said. Asked if Trump’s comments make it clear that he can’t be relied on, Karhi replied, “Obviously.”

While Trump and Netanyahu were close allies during Trump’s time in office, the former president turned on the embattled Israel leader after Netanyahu congratulated then-President-elect Joe Biden for winning the 2020 election while Trump was still trying to overturn the results. In interviews for a book about Middle East peace efforts, Trump, according to its author, used an expletive to describe Netanyahu and said he believed the Israeli leader never really wanted to make peace.

Trump’s rivals quickly seized on his new comments. Speaking to reporters after filing for the New Hampshire primary on Thursday afternoon, DeSantis said, “Now is not the time to be attacking our ally.”

Netanyahu, he said, is “managing one of the most difficult situations Israel’s ever had to face. You may have a personal vendetta or beef with him, but is that really the time to be out there doing that and to be attacking the Israeli defense minister? I don’t think so.” He also criticized Trump for calling Hezbollah “very smart.”

On X, formerly Twitter, White House spokesman Andrew Bates said: “Calling an Iran-backed terrorist group ‘smart’ — especially at a time like this — is unhinged and sickening. ... Why in God’s name would any American do that?”

Biden made his position clear, saying: “Our nation’s support for Israel is resolute and unwavering. And the right time to praise the terrorists who seek to destroy them is never.”