Iran's Supreme Court has quashed the death sentence passed on a woman who killed an intelligence officer she claims tried to rape her.
The case has implications for other Iranian women, rights groups said
Afsaneh Norouzi, 33, was arrested seven years ago after the Iranian officer was found stabbed to death on the holiday island of Kish in the Persian Gulf.
The mother of three claimed she used the knife to defend herself - prompting support from women's rights groups.
A lower court will decide whether Mrs Norouzi is sentenced again or freed.
"The Supreme Court has quashed the death sentence against Afsaneh Norouzi for some deficiencies in the case," her lawyer, Abdolsamad Khorramshahi, told the Reuters news agency.
He said he was hopeful for her fate. "I welcome the ruling and see it as opening the way to accept what Afsaneh says: that she acted in legitimate self-defence."
Mrs Norouzi and her family were visiting the intelligence officer in Kish in 1997, when her husband was called away.
She said she tried to defend herself with a knife when the officer attempted to rape her.
A court in Kish eventually found her guilty of murder and condemned her to death - a sentence upheld by the Supreme Court last year.
The BBC's Tehran correspondent Jim Muir said she was even told the verdict would be carried out - something that usually means execution is just days away.
But her case was taken up by reformist members of the Iranian Parliament and women's rights advocates.
They argued that if Afsaneh Norouzi were put to death, Iranian women would no longer dare to defend their honour against sexual assault.
The head of the judiciary finally ordered a review - again put before the Supreme Court, which this time quashed the death verdict.
Now the local court in Kish must decide whether to hand down a reduced sentence, or to let Mrs Norouzi go free.