Just days before President Donald Trump's arrival in Tel Aviv, Israeli intelligence officials were shouting at their American counterparts in meetings, furious over news that the U.S. commander in chief may have compromised a vital source of information on the Islamic State and possibly Iran, according to a U.S. defense official in military planning.

"To them, it's horrifying," the official, who attended the meetings, told Foreign Policy. "Their first question was: 'What is going on? What is this?'"

White House officials are touting Trump's visit to Israel next week as a chance to show U.S. solidarity with its closest Middle East ally after eight years of friction between former President Barack Obama and Israeli Prime Minister Benjamin Netanyahu.

But behind the public display of harmony, Israeli intelligence officers are angry and alarmed over the U.S. president revealing sensitive information in a May 10 meeting in the White House with Russian Foreign Minister Sergei Lavrov and the Russian ambassador to the United States, Sergey Kislyak.

Trump divulged classified information gathered by Israel about specific terrorist plotting by the Islamic State. The information reportedly revealed Islamic State advances in bomb-making that could be used to mask an explosive device inside a laptop, and also referenced the city where the unfolding plot was being hatched.

The details Trump spilled likely came from a source that was also useful on Iran's Islamic Revolutionary Guard Corps and its Hezbollah proxies in Syria and Lebanon, which are much higher priorities for Israel, the official, who spoke on condition of anonymity, said.

"To the Israelis, ISIS is not that big of a concern," the defense official said, using an alternate acronym for the Islamic State. "We have a partner that has done us a favor. They went out of their way to support us in a campaign against ISIS, that they have no real skin in."

In the first 48 hours after the news broke, the Israelis saw little engagement from the Trump administration on the issue. Instead, the administration remained focused on planning for the president's visit next week.

"There's been no collaboration on this issue or any outreach. But it's like a [public relations] circus," the official said.

The revelation that sensitive information may have been passed to Russia, a partner to Iran, was particularly concerning. Israel has become increasingly anxious about Russia's military cooperation with Iran in support of the Syrian regime and its growing cyberwarfare capabilities.

In Israel, there is fear the compromise of intelligence could damage the country's interests and even jeopardize lives, the official said.

The Trump administration, however, has denied any intelligence sources or methods were revealed in the president's talks with the Russians. Trump's national security advisor, Lt. Gen. H.R. McMaster, said the counterterrorism information Trump shared was "wholly appropriate."

John Sipher, who used to run intelligence operations against Russia for the CIA, said sharing information with Moscow carried high risks. "The Russians are the biggest and most capable worldwide service other than the United States," Sipher said. "Even giving them a little bit allows them to put it together."

While Israeli intelligence officials were aware of Trump's limited grasp of military operations and intelligence procedures, they didn't expect the inexperienced president to play fast and loose with "one of their most sensitive of accesses," the defense official said.

If the source was lost, it also could affect a U.S.-led military operation to take back Raqqa from the Islamic State with American-backed Syrian Kurdish and Arab forces, he said.

"Sources aren't infinite," he said. "They are already reassessing: 'Where are we going to be able to gain that kind of information?'"

The value of the intelligence is virtually a holy grail for spy services, experts said. Insights into the workings of a terrorist group's inner circle are coveted and "quite rare," said Bruce Hoffman, a professor at Georgetown University who has advised the U.S. government on counterterrorism. "It's all solid gold. It doesn't get much better than that."

While the U.S.-Israel alliance will survive the episode intact, some former U.S. and Israeli officials worry that it could have a lasting effect on intelligence sharing while Trump remains in office.

"What Trump did is liable to cause heavy damage to Israel's security, as well as the source, and U.S. security,'' Danny Yatom, a former chief of Mossad, Israel's intelligence service, told a Tel Aviv radio station. "Especially if this information reaches our good friends, the Iranians."

Yatom said there was a danger the breach could cause a "loss of faith between the intelligence services."

Apart from dismay in Israel's security establishment over Trump's talk with the Russians, the president's scheduled visit to Israel — part of a nine-day overseas trip — has generated some PR headaches even before his arrival.

Junior advance staffers on the ground have reportedly scheduled only 15 minutes for Trump's visit to Yad Vashem, the national Holocaust memorial, which did not go over well in Israel. And it's unclear if that visit will be extended.

Trump had also wanted to give a speech at the ancient mountain fortress of Masada after a dramatic helicopter landing. But when that plan was ruled out by the Israeli military, his team opted to cancel the speech and have the president speak at the Israel Museum in Jerusalem.

Daniel Kurtzer, a former U.S. ambassador to Israel, said when Trump sits down with Israeli and Palestinian leaders next week, his counterparts may be reluctant to share sensitive diplomatic stances with a president known for his lack of discretion, he told FP.

But U.S.-Israeli relations are resilient and will ultimately survive both the scheduling hiccups and the intelligence disclosure. The alliance, defined by common interests in the region, is too important to let one intelligence leak, however damaging, upend the entire relationship.

"It's a very dangerous thing that the president did," Kurtzer said. "On the other hand, it's not a deal breaker with Israel."

FP staff writer Elias Groll contributed to this report.