BBC regional analyst Sadeq Saba examines the controversial Tehran trial of an intelligence agent accused of killing Iranian-born Canadian journalist Zahra Kazemi. The judge ended it abruptly on Sunday.
This was never going to be an easy court case. The hardline judiciary wanted a quick trial in order to limit further damage to its reputation.
Diplomats found they were unwelcome at the court
But lawyers representing Zahra Kazemi's family were determined to expose what they believed was a cover-up by the judiciary.
At first, under pressure from the Canadian government and the European Union, the judge ordered an open trial.
But it appears that some unexpected damaging revelations in the first session of the court made him change his decision.
The judiciary was angry when Ms Kazemi's tearful mother told the court she had seen evidence that her daughter was tortured to death.
Judicial officials were also concerned that Ms Kazemi's defence team - led by Nobel Peace Prize winner Shirin Ebadi - might use the open court to expose further damaging facts about Ms Kazemi's killing.
Iran's handling of the case was seen as a key test of its resolve to tackle human rights abuses. But ending such a sensitive trial after only two short sessions will hardly help the Iranian government.
The foreign diplomats who were prevented from attending the second day of the hearing have reportedly warned that the move could have serious diplomatic consequences for Iran. Canada has already recalled its ambassador from Tehran.
Iran is already under intense international pressure for its controversial nuclear programmes.
Fresh media reports also predict that Washington is about to get tough with Iran over allegations that Tehran had links to al-Qaeda.
President Khatami's criticisms were ignored by the judiciary
Under such circumstances, Ms Kazemi's court case adds to the Islamic Republic's problems.
The European Union also will find it more difficult to continue its policy of engagement with Tehran. The EU's policy towards Iran's nuclear programme is already getting closer to Washington's tough approach.
The death of Zahra Kazemi has split the Iranian establishment, with the reformist-controlled intelligence ministry denying that their agent was responsible and accusing the hardline judiciary of killing her.
President Mohammad Khatami has publicly criticised the way the case has been handled by the judiciary. He has said he believes that the intelligence agent is innocent and has urged the judiciary to identify the real killer.
But judicial officials did not pay any attention to the president and went ahead with their plans for a quick trial. This event is another indication that the reformists in the Iranian leadership are increasingly losing their influence.
Iran's judiciary is seen as a bastion of hardline conservatives, who have little respect for international standards of fair justice. Few human rights activists expected Ms Kazemi's court case to be fair.
The abrupt ending of the trial after only two sessions strengthens their view that this trial was another example of a travesty of justice in Iranian courts.