Mesri also stole scripts and plot summaries for "Game of Thrones", according to the indictment.
Mr. Mesri "had worked on behalf of the Iranian military to conduct computer network attacks that targeted military systems, nuclear software systems and Israeli infrastructure", the indictment said, but it did not suggest that the hacking was sanctioned by the state.
USA prosecutors say he stole scripts and plot summaries for then unaired episodes of the global smash hit "Game of Thrones" series, and unaired episodes for multiple other shows, including the "Curb Your Enthusiasm" comedy series. The decision to indict him is part of a "name and shame" strategy the US government has used in the past to try to curb the work of foreign hackers it doesn't expect to apprehend.
The indictment of Behzad Mesri alleges that he stole proprietary data, including information about unreleased episodes of "Game of Thrones", and then sought to extort the company.
"For the rest of his life - and he's a relatively young man in his late 20s - he will never be able to travel outside Iran, " he said. The FBI also said Mesri was a member of the hacker group Turk Black Hat Security team and conducted hundreds of website defacements.
One of those targets was reportedly HBO.
He then sent a series of anonymous emails to multiple HBO executives, employees, and other representatives providing proof that he had hacked into their systems, according to the Federal Bureau of Investigation.
But in the HBO hack, authorities say his motives may have been simpler: greed.
Some of the material Mesri is alleged to have leaked included the HBO logo with an image of Game of Thrones Winter King superimposed over it, with the words "Winter is Coming".
He demanded $6 million paid in untraceable bitcoin or he would release the programs.
But the case has also revealed disagreements inside the Justice Department, where senior officials have been pushing in recent weeks to make public a number of ongoing investigations involving Iranian suspects. A news conference was planned for Tuesday afternoon to provide more details.
In a statement in August, HBO said that was not communicating with the hacker.