The case also highlights the power of Iran's judiciary, which is controlled directly by the nation's ruling clerics and has rejected apparent appeals by President Mahmoud Ahmadinejad to show some leniency.
But Ahmadinejad has also tried to draw attention to Iranians in U.S. jails, raising the possibility the detainees have been viewed as potential bargaining chips with Washington at a time of high-stakes showdowns over Iran's nuclear program.
Authorities in the Tehran Revolutionary Court imposed a blanket ban on observers, including Swiss Ambassador Livia Leu Agosti, who represents U.S. interests in Iran in the absence of direct diplomatic relations.
Details of the nearly five-hour hearing were not made public and it was unclear whether the two Americans in Iranian custody - Shane Bauer and Josh Fattal - were present in the Revolutionary Court, which deals with state security cases like those of people arrested in the violent aftermath of Iran's disputed election in 2009.
The third American, Bauer's fiancee, Sarah Shourd, was released in September on $500,000 bail arranged through the Gulf nation of Oman, which maintains close ties to the West and Iran. She was ordered back to Tehran for the trial by Iranian officials and the bail will likely be forfeited because of her absence.
It was not known whether the court would call additional hearings or render a verdict based on the single hearing. The lawyer for the Americans, Masoud Shafiei, could not immediately be reached for comment after he exited the court through a back door to bypass waiting journalists.
The Americans were detained in July 2009 along the Iraqi border.
They claim they were hiking in Iraq's Kurdistan region and that if they crossed into Iran it was inadvertent.
Iran, however, pressed forward with spy charges that could bring a maximum sentence of 10 years in prison if convicted.
Shourd and Bauer had been living together in Damascus, Syria, where Bauer was working as a freelance journalist and Shourd as an English teacher. Fattal, an environmental activist, went to visit them in July 2009 shortly before their trip to northern Iraq.
The families of the detainees have made high-profile appeals for their release, including during a visit by the three mothers to Tehran in May. The trip, however, was carefully orchestrated by Iranian authorities and included a meeting between the mothers and relatives of five Iranians held for more than two years by the U.S. military in Iraq.
Just days after her release, Shourd met Ahmadinejad while he was in New York to attend the U.N. General Assembly and asked for his intervention to free Bauer and Fattal.
In an interview with The Associated Press at the time, Ahmadinejad noted that while the Americans had broken the law by crossing into Iran, he would ask the judiciary to expedite the process and to "look at the case with maximum leniency."
Yet Ahmadinejad also has used the case to draw attention to Iranians held in the United States.
In particular, he drew a link to the trial in the U.S. of Amir Hossein Ardebili, an Iranian who was sentenced to five years in prison last year after pleading guilty to plotting to ship sensitive U.S. military technology to Iran.
According to court papers, Ardebili worked as a procurement agent for the Iranian government and acquired thousands of components, including military aircraft parts, night vision devices, communications equipment and Kevlar body armor. U.S.
authorities targeted him in 2004 after he contacted an undercover storefront set up in Philadelphia to investigate illegal arms trafficking.
The current case in Tehran recalls that of American-Iranian journalist Roxanna Saberi, who was arrested in Iran in January 2009 and convicted of espionage and sentenced to eight years in prison.
She was freed on appeal in May 2009.
A political analyst at the independent Mardomsalari newspaper in Tehran, Hamid Reza Shokouhi, said the secretive nature of the court proceedings is "not necessarily a negative point" for the jailed Americans. He said that past experiences, such as Saberi's case, showed that the judiciary can eventually show a "positive attitude."