The U.S. National Security Agency (NSA) was spying on Israeli Prime Minister Benjamin Netanyahu during the Iran nuclear talks in spite of President Barack Obama’s 2014 promise to limit eavesdropping on foreign leaders.

During last summer’s nuclear arms agreement with Iran, NSA captured conversations between Netanyahu and other his aides in an effort to counter Netanyahu’s campaign against the nuclear deal, according to unnamed US officials, the Wall Street Journal reported.

The NSA found that Netanyahu leaked details of the U.S.-Iran negotiations, learned through Israeli spying operations.

NSA surveillance also caught communication involving members of Congress. Unnamed Jewish-American organizations were being coached by Israel’s ambassador to the United States, Ron Dermer, on how to influence U.S. lawmakers to oppose the deal.

While Israel lobbied Congress before the nuclear deal was passed in September, the NSA removed from reports the names of lawmakers and personal information.

A senior U.S. official said the NSA’s goal was “to give us an accurate illustrative picture of what [the Israelis] were doing.”

“We do not conduct any foreign intelligence surveillance activities unless there is a specific and validated national security purpose. This applies to ordinary citizens and world leaders alike,” a White House National Security Council spokesman told the Wall Street Journal.

Allies such as French President Francois Hollande and German Chancellor Angela Merkel were placed on a protected list guarding them from U.S. eavesdropping. But Obama deemed spying on Netanyahu a “compelling national security purpose,” the report said.