Three American hikers who have been detained in Iran after crossing into the country from Iraq have been charged with espionage, according to reports by Iran's State News Agency.

Shane Bauer, 27, Sarah Shourd, 31, and Josh Fattal, 27, have been detained in Iran since July 31. Their families say they entered the Islamic Republic accidentally while hiking in a scenic area of northern Iraq.

The families, who have had no contact with the detainees, released videos in October that showed them dancing and singing before they were captured by Iranian authorities.

SLIDESHOW: American Hikers Detained in Iran

Iranian Foreign Minister Manouchehr Mottaki said that the fate of the three hikers rests with judicial authorities. Bauer, Shourd and Fattal have been visited by Swiss diplomats who oversee U.S. interests in Iran.

Mottaki gave no other details on the case. Iranian President Mahmoud Ahmadinejad said in an interview with The Associated Press in September that he could ask the judiciary to "take a look at the case with maximum leniency."

The Associated Press contributed to this report.