The release this week of Sarah Shourd, one of three Americans held for more than a year on spying charges, has been presented as an act of clemency by the Iranian regime. But by claiming the credit for freeing Shourd, the government reveals serious inconsistencies with its own account.
President Mahmoud Ahmadinejad has portrayed himself as Shourd's benefactor, but it was his intelligence service that held her for 14 months. He was thus directly responsible for her detention without trial.
Shourd was freed on September 14, just a week before Ahmadinejad was due to travel to New York to attend the 56th session of the United Nations General Assembly.
Ahmadinejad was clearly aware he would get a rough ride from the American media because of the continued detention of the three young people accused of spying, so freeing one of them offered a way of turning the story around in his favour.
The three -- Shourd, Shane Bauer and Joshua Fattal -- were arrested by Iranian border guards in July 2009. Family members said they had been hiking in Iraqi Kurdistan, while Tehran claimed that they crossed into Iranian territory to carry out espionage.
Throughout their detention, Ahmadinejad has insisted the case against them lies in the hands of a completely independent judiciary, which he said "does not make decisions based on political expediency."
Even the way the release was announced underscored just how untrue this claim is.
On September 9, reporters in Tehran received a text message from Iran's Ministry of Culture and Islamic Guidance inviting them to a press conference on September 11 at which Shourd's release would be announced. Within a matter of hours, the Iranian judiciary described the news as no more than rumour. In other words, it had been caught unaware by a decision already taken by the executive.
In reality, it was Ahmadinejad's intelligence ministry that had been handling this highly political case all along. The ministry ensured the prisoners were cut off from the outside world, even from their lawyer, and prolonged the investigative stage for more than a year so that the case never got as far as the courts.
Holding a high-profile spying trial could have been seriously damaging if no evidence could be drummed up to prove more than the minor offense of illegally crossing the border.
The lawyer acting for all three detainees, Massoud Shafie, told me, "I heard from the person directly in charge of the case that there is no evidence of espionage."
The Ahmadinejad administration was hoping its three captives could be used as a bargaining chip. Talk of some kind of prisoner exchange surfaced a few months ago.
The Obama administration, however, showed no sign of willingness to play ball.
As time passed, it became ever more apparent that things were not going the way the Iranian government had hoped.
Then the legal authorities in Iran began to get cold feet over Shourd specifically, when they were alerted to possible problems with her health.
Three weeks ago, Shafie met the deputy prosecutor for Tehran city and reminded him that Shourd's situation needed to be addressed urgently. He told me later that the official response he received indicated that the judiciary was frustrated with the intelligence ministry's handling of the spy case. http://editorial.huffingtonpost.com/mt.cgi?__mode=view&_type=entry&id=722012&blog_id=3# Shafie wrote to Tehran's chief prosecutor reminding him he was responsible for Shourd's well being. The lawyer continues the story,
"On receipt of my letter, the head of Branch Three of the Security Court, who is in charge of this case, told his superiors that if there was no action on the case, he would resign. He told them that 'if something happened, you would make me the scapegoat and nothing would happen to my superiors'. He said that either a ruling must be made in the case, or it should be withdrawn so that the prisoners can be released."
Memories are still fresh of the case of Iranian-Canadian journalist Zahra Kazemi, who died of physical mistreatment inside the Evin prison in 2003. No one was ever brought to account, other than low-ranking prison officers.
As Shafie noted in his letter to the Tehran prosecutor, by holding the three prisoners in detention without trial for more than a year, the authorities were breaking the law.
"The law emphasises that detention cannot be longer in duration than the minimum punishment for the crime, even if it is espionage which I don't believe can be the charge here," he said.
"The punishment for espionage is one year or more. If they remain in detention for a year and one month, and a judge eventually sentences them to one year in prison, they will have over-served their sentence by a month."
With time running out and his US trip fast approaching, Ahmadinejad had no option but to do something.
Lawyer Shafie poses some serious questions about this act of indulgence: "Why should they be released if they were spies, and why were they detained if they were innocent?" he said. "Forgiveness and clemency apply to suspects who have received specific sentences and are serving prison terms. My clients' case has remained at the investigative stage throughout.
"Sarah's release shows that this case has ceased to be judicial and is now entirely political."
The treatment of the three American hikers highlights the way the justice system deals with Iranians. Thousands of activists, lawyers, students, and women have been similarly mistreated for political purposes.
President Ahmadinejad should be therefore still be held to account when he arrives New York next week.