Updated

Seven hackers tied to the Iranian government were charged Thursday in a series of punishing cyberattacks on a small dam outside New York City and on dozens of banks -- intrusions that reached into American infrastructure and disrupted the financial system, federal law enforcement officials said.

The hackers were charged in indictments unsealed and announced at a Justice Department news conference in Washington.

All seven worked for Iranian computer companies that did work on behalf of the Iranian government, the U.S. said.

It's unclear exactly why the suspects may have targeted this particular dam, but the attacks from 2011 to 2013 disabled bank websites and caused tens of millions of dollars in losses, the charges say.

One of the seven is accused of gaining access to the control system of the Bowman Avenue Dam, a small flood-control structure in Rye Brook, about 20 miles north of New York City.

The seven accused hackers worked for a pair of Iranian computer companies linked to the Iranian government, including the Islamic Revolutionary Guard Corps, the U.S. said.

None of the individuals is in American custody, and it's not clear whether they will ever be arrested or whether criminal indictments in absentia can be effective in combatting such crimes.  Officials said the goal of such cases is to put cybercriminals on notice that their mouse clicks can be traced, even if they're on the other side of the globe.

"The message of this case is that we will work together to shrink the world and impose costs on these people so that no matter where they are, we will reach them," said FBI Director James Comey.

The Iranian connection first came to light in December.

Thursday's announcement is the latest instance of the Obama administration publicly blaming foreign nations for damaging cyber intrusions.

The Justice Department in May 2014 indicted five Chinese military officials suspected of hacking into several major American companies and stealing trade secrets.

And that December, the federal government linked a damaging attack on Sony Pictures Entertainment to North Koreans.

The Associated Press contributed to this report.