Tehran, Iran (CNN) -- An Iranian court is scheduled to issue a verdict within a week in the case of a group of American hikers detained in Iran, the hikers' lawyer said Sunday.
Attorney Masoud Shafiei, who represents Josh Fattal, Shane Bauer and Sarah Shourd, argued Sunday that his clients were innocent of charges of illegal entry and spying. Shourd was released last year due to medical reasons.
"We can still appeal this decision if we disagree with it. But I am hoping for the best," he said after Sunday's hearing, which was the last court proceeding in their trial.
"The trial of Joshua Fattal, Shane Bauer and Sarah Shourd has concluded and a verdict is expected within the coming week," U.S. State Department spokesman Mark Toner said in a statement.
"We have repeatedly called for the release of Shane Bauer and Joshua Fattal, who have now been held in Iran's Evin prison for two years. Shane and Josh have been imprisoned too long, and it is time to reunite them with their families."
The Swiss are working to gain further information, Toner said. Switzerland represents U.S. interests in Iran in the absence of diplomatic ties between the two nations.
The hearing -- which the hikers' families said lasted about four hours -- came two years to the day after the hikers' arrest near the country's border with Iraq.
Fattal and Bauer have been in Iranian custody since then. Shourd was released in September 2010 for medical reasons, returning to the United States after 410 days of solitary confinement. She remains a defendant in the case, but was not required to appear in court Sunday.
Fattal and Bauer appeared in court Sunday. They looked good and seemed upbeat, Shafiei said.
The two men could be freed within a week of a court order, he said.
If the court reaches a guilty verdict, Shafiei said the time the two have spent in Iranian custody is enough.
"I believe that even if the court finds my clients guilty, the two years that they have already served in prison would be considered as their sentence and they would be released," he said.
"My clients should not be considered spies, because they lack the characteristics and backgrounds of spies," he said.
Fattal and Bauer's families issued a statement saying, "We are pleased that today's hearing was the final session in the case and now hope for an outcome that will bring freedom for Shane and Josh.
"We pray that the Iranian authorities will show compassion to Shane and Josh and we ask everyone who supports them and cares for them to join us in beseeching the grace of God at this important time. The coming days fill us with great hope but they will also be difficult for our families."
The statement said the families heard about the developments at the hearing from the attorney.
Shafiei said he hoped his "clients will be dealt with according to Islamic compassion," given that their hearing falls on the second anniversary of their arrest and at the start of the holy month of Ramadan, the Iranian Students News Agency (ISNA) reported.
U.S. supporters of the two hikers held a rally Friday in front of the Iranian Mission in New York, expressing their hopes for a release as well.
Sunday's hearing was the fourth scheduled for the two, according to ISNA.
Two previously scheduled hearings did not materialize "due to not transferring" the Americans to court, the news agency reported Sunday, quoting their lawyer.
"I tried to meet with my clients before the hearing session, but I failed," the news agency reported the lawyer as saying.
Two years ago, the two men, both 29, along with Shourd -- Bauer's fiancee -- were hiking in Iraq's autonomous Kurdish region along the border.
Iranian police arrested the three Americans, saying they illegally entered Iran. They were also charged with spying.
The Tehran Prosecutor's office has "compelling evidence" that the three were cooperating with U.S. intelligence agencies, Iran's state-run Press TV reported.
Shourd joined family members and supporters who rallied outside Iran's mission at the United Nations Friday.
She said the hikers did not know they had crossed the border while hiking.
Fattal and Bauer have pleaded not guilty to the charges. Under Iran's Islamic law, spying is punishable by death.
CNN's Shirzad Bozorgmehr contributed to this report.