Jason Rezaian's arrest had nothing to do with his being a journalist, Hojatoleslam Gholam-Houssein Mohseni told reporters late Sunday.
He said many foreign journalists were in the country and in many cases, they had been invited by the government of the Islamic Republic.
His remarks were reported by Mizan, the news service of the Iranian judiciary.
While asserting that Rezaian's arrest had nothing to do with his being a journalist, Mohseni declined to comment on the details of the case against him.
Rezaian, The Washington Post's bureau chief in Tehran, was detained in Iran in July last year, though he was not told for months of the charges he faced.
Prosecutors eventually accused him of espionage and other offenses, including "collaborating with a hostile government" and "propaganda against the establishment," according to the Post.
Newspaper rejects allegations
An Iranian court held a final hearing in his secretive trial on August 10.
"It remains unclear even to Jason's lawyer what might happen next," Post executive editor Marty Baron said after the hearing.
The newspaper has rejected the allegations against him.
"Any charges of that sort would be absurd, the product of fertile and twisted imaginations," the Post has said.
The U.S. State Department called the charges "absurd."
Mohseni said Rezaian's final hearing had been held, but, at the request of his lawyer, the court has granted him the opportunity to submit a written defense.
He said a verdict would be announced by the end of this week at the latest.
Obama: Rezaian 'should be released'
President Barack Obama faced criticism for concluding a deal with Iran over the country's nuclear program without a pledge that it would release Rezaian and other Americans held there.
In a speech this summer, Obama mentioned Rezaian and other Americans "who are unjustly detained in Iran."
"Journalist Jason Rezaian should be released," the President said.
Former heavyweight boxing champion Muhammad Ali, an American Muslim, also urged Iran to free him on on bail.
"To my knowledge, Jason is a man of peace and great faith, a man whose dedication and respect for the Iranian people is evident in his work," Ali said in a religiously worded statement issued in March.
Iran's human rights chief, Mohammad Javad Larijani, told news outlet France 24 last year that he hoped Rezaian's case would come to a positive conclusion. "Let us hope that this fiasco will end on good terms," he said.