The White House instructed US spies to eavesdrop on Prime Minister Benjamin Netanyahu and other top Israeli officials earlier this year in an effort to counter campaigning against the Iran nuclear deal, despite promising to curtail listening in on foreign leaders, according to a Wall Street Journal report late Tuesday.

The National Security Agency’s spying dragnet was cast so wide it caught conversations Netanyahu and other Israeli leaders had with US officials and Jewish American leaders. This led to what one source called an “oh shit moment,” because of fears that “the executive branch would be accused of spying on Congress,” according to the report.

The spying on Jerusalem included “a cyber implant in Israeli networks,” giving the NSA access to information in Netanyahu’s office, said the report, which cited several current and former US officials.

The White House and other administration officials refused to comment on the report to the New York-based publication. There was no immediate comment in Jerusalem on the report, which was released just before midnight Israel time.

Contacted by AFP, the White House did not deny the report, but stressed the importance of its ongoing close ties with Israel.

The Israeli embassy refused to comment.

Much of the spying was focused on gaining an intelligence on what Israeli and Jewish figures were doing to campaign among US lawmakers to oppose the nuclear deal, inked between Iran and six world powers and July.

One senior US official told the daily the NSA was looking “to give [the administration] an accurate illustrative picture of what [the Israelis] were doing.”

According to the report, the White House learned through the spying how “how Mr. Netanyahu and his advisers had leaked details of the US-Iran negotiations — learned through Israeli spying operations — to undermine the talks; coordinated talking points with Jewish-American groups against the deal; and asked undecided lawmakers what it would take to win their votes.”

When confronted about leaking confidential details from the talks to US lawmakers, Israelis rebuffed the allegations, according to the report.

An Israeli Embassy spokesperson in Washington also told the Wall Street Journal that allegations that Israeli officials told US Jewish groups how to lobby Congress on their behalf were “total nonsense.”

The Israeli effort against the nuclear deal failed: Congress, given oversight over the landmark pact, voted against it in September, but without enough support to override a presidential veto.

The issue, and an Israeli campaign against the administration of US President Barack Obama, polarized ties between Jerusalem and Washington, as well as between Obama and Netanyahu, which had been shaky for years amid disputes over how to deal with Iran’s nuclear program and the moribund peace process with the Palestinians.

Though Obama promised in 2013 to curb American spying on foreign leaders, following revelations of NSA spying on allies leaked by whisteblower Edward Snowden, an official said the idea of stopping tracking Netanyahu was barely entertained.

“Going dark on Bibi? Of course we wouldn’t do that,” the paper quoted as senior US administration official saying, using a nickname for the prime minister.

After concerns were raised that the NSA was spying on conversations between US lawmakers and Netanyahu or other Israeli officials, the White House told the NSA to decide what info to give out, allowing it to mask the names of US citizens being spied on.

In October, the Wall Street Journal reported that the US spied on the Israeli air bases and secret communications in 2012, fearing an attack on Iranian nuclear facilities was in the works.

According to that report, “[n]erves frayed at the White House” when the US discovered Israeli air activity over Iran, and Washington dispatched an aircraft carrier to the Mideast and also prepared attack aircraft, in case, as one senior American official told the Journal, “all hell broke loose.”

At the same time, US intelligence was monitoring Israeli communications to ensure that Jerusalem was unaware of secret backchannel meeting between the US and Iran taking place in Oman, the paper reported.

AFP contributed to this report