Iranian hackers infiltrated the control system of a small dam less than 20 miles from New York City two years ago, according to a report by Wall Street Journal. Federal investigators initially thought the target might have been a much larger dam in Oregon.

Investigators said hackers didn’t take control of the dam but probed the system, according to those familiar with the matter.

The breach came amid attacks by hackers linked to Iran’s government against the websites of U.S. banks, and just a few years after American spies had damaged an Iranian nuclear facility with a sophisticated computer worm called Stuxnet.

The U.S. has more than 57,000 industrial-control systems connected to the Internet, more than any other country, according to researchers at Shodan, a search engine that catalogs each machine online. They range from office air-conditioning units to major pipelines and electrical-control systems. Many of the computers controlling industrial systems are old and predate the consumer Internet.