Kylie Moore-Gilbert, a Melbourne University lecturer who was detained in 2018, was released in an apparent prisoner swap on Wednesday, Iranian state media reported.
The Middle Eastern studies expert had been picked up at Tehran Airport while trying to leave the country after attending a conference.
She was held in Evin prison where British-Iranian dual national Mrs Zaghari-Ratcliffe was also imprisoned.
Watch: Nazanin Zaghari-Ratcliffe 'told to pack' for return to prison over fresh charges
Mrs Zaghari-Ratcliffe has been detained in Iran since 2016 after being sentenced to five years in prison over allegations, which she denies, of plotting to overthrow the Iranian government.
Her husband Richard Ratcliffe told the PA news agency: “It’s really good news… It was a shock and it was a nice shock and Nazanin was really happy when I told her because she hadn’t seen the news.
“I think probably on a selfish level there’s always a kind of a bittersweet wondering when it’ll be our turn. Of course there isn’t a queue, these things happen in a random order.
“The reality is that whenever there’s movement, there’s hope.”
He added: “I don’t know what it means for us, it’s definitely a good thing for Kylie and it’s definitely a good thing for all of us that deals are being done.”
Mrs Zaghari-Ratcliffe was arrested at Tehran’s Imam Khomeini Airport while travelling to show her young daughter Gabriella to her parents in April 2016.
She was later afforded diplomatic protection by the UK Government, which argues that she is innocent and that her treatment by Iran failed to meet obligations under international law.
Mrs Zaghari-Ratcliffe remains out of prison after she was released on furlough in March due to the coronavirus pandemic.
Mr Ratcliffe said: “All I can see on our case is either no news or bad news, but that was also true in Kylie’s case, we either only saw bad news until this afternoon and it was two years of horrendous cruelty in a terrible situation and great dignity from her and her family.
“Now it looks like it’s over and she can begin to heal, they can begin to heal.
“It can happen, and I think it’s important. She shows there’s light at the end of the tunnel and that’s a really good reminder for me and for Nazanin when feeling really glum.”
He added: “Realistically, people come home. We could come home soon. Not to say we will, but we could.”
Mr Ratcliffe said the UK Government should be “openly learning” how other countries have successfully brought people home from Iran, including the Australian authorities.
The news of Dr Moore-Gilbert’s release was welcomed by Mrs Zaghari-Ratcliffe’s MP Tulip Siddiq, who added: “Now let’s make this a Christmas reality for Nazanin too.”
Amnesty International UK said the academic’s release was an “enormous relief” and called on the Government to put pressure on Iranian authorities to release other detainees.
Mrs Zaghari-Ratcliffe’s original sentence is due to end on March 7 next year.
However, she appeared in court earlier this month on charges of spreading propaganda against the regime, termed “spurious” by Mr Ratcliffe, who said the case presented the same evidence presented as when she was convicted in 2016.
Mr Ratcliffe added: “We only get to see the bad stuff so I think we have to always prepare for the worst, hope that the Government pulls something out of the hat and that she’s home for Christmas or is at least home in March, but fully expect the closer we get to the end of her sentence the more likely we get bad news and it gets extended.”
Reporting by PA
Watch: How England's new three-tier COVID system will work