JERUSALEM >> A fragile ceasefire between Israel and Iran appeared to take hold Tuesday after a final volley of deadly strikes between the two countries infuriated President Donald Trump and highlighted the difficulty of ending a war that had raged for 12 days.

The details of the ceasefire remain unclear, but it came together after Trump asked for Qatar’s help, and the Qatari prime minister, Sheikh Mohammed bin Abdulrahman Al Thani, persuaded Iran to end the fighting with Israel, according to three diplomats who were briefed on the matter and insisted on anonymity to discuss sensitive matters.

Trump had abruptly announced the truce Monday evening, surprising some of his own advisers. The announcement came after Iran had fired missiles at an American military base in Qatar in retaliation for U.S. strikes on three Iranian nuclear sites over the weekend. Iran had given advance warning of its strike, allowing U.S. and Qatari forces to shoot down most of the missiles, American and Israeli officials said. There were no casualties.As the ceasefire went into effect Tuesday morning, Trump angrily accused Israel and Iran of violating the deal, and he demanded that the two countries end the war. As he boarded Marine One to begin a trip to The Hague for a NATO summit, Trump told reporters that Israel and Iran “have been fighting so long and so hard” that they did not know what they were doing — adding an expletive for emphasis.

‘Not happy with Israel’

Trump directed his strongest criticism at Israel.

“Israel, as soon as we made the deal, they came out, and they dropped a load of bombs, the likes of which I’ve never seen before,” he said, adding, “I’m not happy with Israel.” He added that he would be “really unhappy” if Israel attacked Iran on Tuesday in retaliation for what the president described as “one rocket” fired from Iran, adding that it “didn’t land.”

A White House official said that Trump had spoken with Prime Minister Benjamin Netanyahu of Israel on Tuesday morning and was “firm and direct” in exhorting him to sustain the ceasefire. In a post on social media, Trump warned Israel not to “DROP THOSE BOMBS,” saying “IF YOU DO IT IS A MAJOR VIOLATION. BRING YOUR PILOTS HOME NOW.”

The lack of clarity about the timing of the truce may have added to the confusion. Iran’s time zone is half an hour ahead of Israel.

Continued missile attacks

Netanyahu said Tuesday afternoon that the ceasefire was to have taken effect at 7 a.m. Israel time. Four hours earlier, at 3 a.m., Israel attacked targets “in the heart of Tehran,” his office said. Tehran residents described a night of terrifying explosions caused by what they said was the heaviest Israeli bombardment since the war began June 13.

Fifteen residents, speaking by phone and in text and audio messages, said large flames had illuminated the night sky over the city, and there had been huge clouds of smoke.

Then, shortly before the truce went into effect, Iran fired a barrage of missiles at Israel, killing at least four people when a missile hit an apartment building in the southern Israeli city of Beersheba, Israeli officials said. One body was found inside the fortified safe room of an apartment, and the three others were found outside of it, according to an Israeli military official, Col. Asher Benbenishti.

Just after 7 a.m. in Israel, Iran fired another missile, and then two more three hours later, according to Israel. Netanyahu’s office said those missiles were intercepted or fell in open areas.

Iran’s Revolutionary Guard said that, in retaliation for Israeli attacks on Iran overnight, Iran had launched 14 missiles at military and logistical centers in Israel in the “final minutes” before the ceasefire took effect, Iranian state media reported. In response, Netanyahu’s office said, Israeli forces had destroyed a radar position near Tehran, in what appeared to be a limited retaliation. Earlier, Israeli officials had threatened to respond with great force.

Trump said later that the ceasefire was holding.

“ISRAEL is not going to attack Iran,” he wrote on social media. “All planes will turn around and head home, while doing a friendly ‘Plane Wave’ to Iran. Nobody will be hurt, the Ceasefire is in effect!”

As night fell in the region, there was no evidence of further attacks in either Iran or Israel, indicating the truce was working.

Both sides claim victory

Israel and Iran each framed the truce as a victory.

Netanyahu celebrated “a historic victory” in an address to the nation and said Israel had rendered Iran’s nuclear project useless. He added, “Israel has never had a friend like President Trump in the White House.”

The Iranian national security council said Tehran had “forced the enemy to regret and accept defeat and unilaterally stop its aggression.”

But in a phone call with the leader of the United Arab Emirates, Iran’s president, Masoud Pezeshkian, said Tehran was “ready to resolve issues at the negotiating table,” according to an official readout of the call by Pezeshkian’s office.

He also asked the Emirati leader to tell the United States that Iran was “simply seeking its legitimate rights and has no demands beyond this, and definitely has not and will not seek a nuclear weapon.”

The statements suggested that Iran, despite earlier failed talks, was willing to engage in diplomacy.

The Israeli military’s chief of staff, Lt. Gen. Eyal Zamir, said Tuesday that Israeli forces were now shifting their attention back to the Gaza Strip as the ceasefire with Iran appeared to be holding. The focus, he said in a statement, was “to bring home the hostages and topple Hamas’ rule.”

About Gaza ...

Analysts said that Netanyahu, riding a wave of Israeli public support for the war against Iran, may now be in a stronger position to negotiate an end to the devastating war in Gaza that began more than 20 months ago.

For much of that time, the prospect of a negotiated, comprehensive ceasefire with Hamas, the armed Palestinian group that led the Oct. 7, 2023, attack against Israel, threatened to implode Netanyahu’s coalition government. But as Netanyahu’s poll numbers have risen, analysts and allies said, he may have the political capital to change course in Gaza.

The conflict with Iran began with Israeli airstrikes June 13. Iran responded by firing hundreds of ballistic missiles and drones at Israel. In a turning point in the war, the United States then struck three Iranian nuclear sites, including Fordo, a heavily fortified installation built into the side of a mountain.

Since the fighting began, at least 606 people in Iran have been killed by Israeli strikes — 107 of them over the past 24 hours, the Iranian health ministry said Tuesday. Iranian fire has killed 28 people in Israel, including the four Tuesday, the Israeli government said.

After the announced ceasefire, Brig. Gen. Esmail Ghaani, commander of Iran’s Quds Forces, which oversees Iran’s proxy militias in the Middle East, made a public appearance Tuesday, videos on state media show.

Ghaani, without his military uniform, attended a victory rally in downtown Tehran — the first-known public appearance by a senior military commander since Israel assassinated most of the top military ranks of Iran’s armed forces and Revolutionary Guard.