The head of the United States National Security Agency, Admiral Michael Rogers, was secretly in Israel last week for a working visit that dealt with forging closer cooperation in the cyber field with the Israel Defense Forces’ Intelligence Corps Unit 8200, especially against attacks by Iran and Hezbollah,a senior Israeli official has told Haaretz.

The NSA is the largest agency of the American intelligence community and deals with signal intelligence through monitoring, interception and analysis of communications such as telephone conversations, emails, communications between computers and other sources. The NSA is also responsible for protecting the computer and communications networks of the U.S. government from cyber attacks by hostile forces. It also carries out its own cyber attacks on countries or individuals that are considered intelligence or operational targets.

A senior Israeli official noted that Rogers came to Israel as a guest of the commander of Unit 8200, but also met with senior officials from other Israeli intelligence agencies. Rogers did not meet with IDF Chief of Staff Lt. Gen. Gadi Eisenkot or the director of Military Intelligence Maj. Gen. Herzl Halevi in the course of his visit.

Rogers is also head of the U.S. Army’s Cyber Command. One of the subjects that apparently came up in his discussions in Israel was the IDF cyber arm, the creation of which Eisenkot announced last June, and that will bring together all the various IDF cyber entities under its aegis.

The senior Israeli official noted that one of the subjects that Rogers discussed in Israel was cooperation in the field of cyber defense, particularly in the face of attacks from Iran and Hezbollah. A few days before Rogers’ arrival in Israel, the U.S. Justice Department filed indictments for the first time against a group of Iranian hackers on charges of carrying out cyber attacks on banks and essential infrastructure in the U.S. three years ago at the behest of the Iranian Revolutionary Guards. Israel has also faced cyber attacks from Iran and Hezbollah, which according to senior IDF officers were prominent during the fighting with Hamas and its allies in Gaza in the summer of 2014, but have risen in intensity in recent months.

According to a book by New York Times chief Washington correspondent David Sanger, the NSA and Unit 8200 cooperated on an offensive cyber operation against the Iranian nuclear program that was given the code name Olympic Games. As part of the operation, carried out between 2008 and 2011, the two agencies created the computer worm dubbed Stuxnet and planted it in the communications networks of Iran’s uranium enrichment facilities.

It was also reported in Sanger’s book that by means of the computer virus, the NSA and Unit 8200 managed to sabotage Iran’s network of centrifuges, taking many of them out of service, and collect valuable intelligence on the Iranian nuclear program. The operation brought about a delay of between a year and two years in the Iranian nuclear program, but was ultimately uncovered due to a leak of the virus from computers in the Iranian nuclear program to other computers in Iran, and from there to the global Internet.

Cooperation between the NSA and Unit 8200 is deep, intimate and has been ongoing for decades. NSA documents leaked by Edward Snowden disclosed the extent of this cooperation. For example, a top-secret NSA memorandum from April 2013 that was published in August 2014 on The Intercept website said the NSA was maintaining far-reaching technical and research ties with Unit 8200 and was sharing information with it on access, interception, goals, language, analysis and reporting.

According to the document, the intelligence cooperation between the two agencies is focused mostly on targets that constitute a strategic threat to American and Israeli interests, such as countries in North Africa, the Middle East, the Persian Gulf, South Asia and the former Soviet Asian republics.

“Within that set of countries, cooperation covers the exploitation of internal governmental, military, civil and diplomatic communications and external security/intelligence organizations,” the NSA internal memorandum states. “Regional Weapons of Mass Destruction Proliferation and ‘Stateless’/International Terrorism comprise the exchanged transnational target set. A dedicated communication line between NSA and [8200] supports the exchange of raw material, as well as daily analytic and technical correspondence. Both NSA and [8200] have liaison officers, who conduct foreign relations functions, stationed at their respective embassies.”