Montreal university professor Homa Hoodfar, who had been detained in Tehran's infamous Evin prison since June 6, has been released, Prime Minister Justin Trudeau has confirmed.

Hoodfar, of Concordia University, was released from the Iranian prison Monday and is currently in Oman, where she was greeted by her niece, Amanda Ghahremani.

امتثالا للأوامر السامية لجلالة السلطان لتلبية التماس الحكومة الكندية ..الإفراج عن مواطنة كندية متحفظ عليها في إيران. <a href="https://t.co/Sj6RyJYxkD">pic.twitter.com/Sj6RyJYxkD</a> —@oman1_news

Hoodfar, who is 65 and suffers from a rare neurological disease that causes severe muscle weakness, was in hospital at one point before being returned to her cell, according to her family. They said she could barely walk or talk.

"She's very frail, she looks extremely thin … and very worn," Hoodfar's colleague and longtime friend Marguerite Mendell said at a Concordia University news conference Monday afternoon.

"But she's free, she's free and she's out of Iran, and she will get medical care and medication," said Mendell, a professor and the graduate program director of the school of community and public affairs.

The Iranian-Canadian anthropology professor Hoodfar was arrested while on a personal and research visit to Iran, her family said.

Hoodfar was indicted along with three others who are still detained in Iran:

Siamak Namazi, an Iranian-American businessman.

Nazanin Zaghari-Ratcliffe, an Iranian-British woman who works for the Thomson Reuters Foundation, the charitable arm of the news agency.

Nizar Zakka, a U.S. permanent resident from Lebanon who has done work for the American government.

Canadians relieved, Trudeau says

"Canadians are relieved that Dr. Hoodfar has been released from jail and will soon be reunited with her family, friends and colleagues," Trudeau said in a statement.

"In the absence of diplomatic representation of its own in Iran, Canada worked closely with others who were instrumental in helping secure Dr. Hoodfar's release — most notably Oman, Italy and Switzerland."

Iranian authorities were first to confirm that Hoodfar had been released.

Canada's Foreign Affairs Minister Stéphane Dion said his meeting with his Iranian counterpart last week in New York, on the sidelines of the UN General Assembly, proved to Iran that Canada "was very serious" about the release of Homa Hoodfar.

Dion, who is now in Colombia, told CBC News that Canada did not make concessions to Iran for her release.

"That's not the way it works," he said. "We negotiate for the sake of Canadians, not to please another country," he said.

Dion also said that if he could easily reopen official diplomatic ties with Iran, he would do so "tomorrow," but it's not that easy.

"We need to be in Iran," said Dion.

Joseph Pickerill, spokesman for Dion, said the Liberals are proceeding step by step when it comes to Canada's approach of trying to restart diplomatic relations with Iran and reopen an embassy.

"Our strategy of cautious engagement is a harder path than that chosen by the previous government, but if we want to make real progress in the promotion of human rights and the security of our allies, it's the only way forward."

Canada thanks those who helped secure the release of Dr. Homa Hoodfar from jail in Iran. Please read my statement: <a href="https://t.co/zVhXhZLJx0">https://t.co/zVhXhZLJx0</a> —@JustinTrudeau

'Dabbling in feminism'

Hoodfar had been charged by Iranian authorities with collaborating with a hostile government against national security and with propaganda against the state.

Those charges, however, were never presented to her lawyer. Instead, they were published in the Iranian press, quoting the prosecutor as saying Hoodfar was "dabbling in feminism."

Hoodfar writes frequently on sexuality and gender in Islam.

Supporters in Canada and internationally had been calling for Hoodfar's release.

Homa <a href="https://twitter.com/hashtag/Hoodfar?src=hash">#Hoodfar</a>'s family 'extremely grateful' for all support but is not speaking publicly, currently. Cdn professor free,flew to Oman <a href="https://twitter.com/hashtag/CBC?src=hash">#CBC</a> —@OrmistonOnline

They said she was being kept in solitary confinement and that her health was failing.

'Surreal' news

Haley Lewis, who helped organize a rally last Wednesday that attracted hundreds of Hoodfar's supporters to a square near Concordia, said no one expected she would be freed so soon.

"It's all so surreal, to be honest," she said.

"Of course I would really want to see her with my own eyes, but I'm sure if she's coming home, she's going to want to spend some time with her closest relations."