Iran released on Monday a Canadian-Iranian academic who was detained in Tehran in June, the Foreign Ministry spokesman said, a week after the two countries began talks on a potential restoration of diplomatic ties broken off four years ago.

Homa Hoodfar, 65, is a teacher at Concordia University in Montreal, Canada, and an expert on gender and Islam.

"Homa Hoodfar, the retired professor of Canadian universities, who had been detained in Iran based on some accusations, was released this afternoon for humanitarian reasons including illness," Foreign Ministry spokesman Bahram Qasemi was quoted as saying.

He said Hoodfar had left Iran and was traveling to Canada via the Gulf state of Oman.

Iranian Foreign Minister Mohammad Javad Zarif and his Canadian counterpart Stéphane Dion met last week in New York for the first time since Tehran and Ottawa severed relations in 2012.

Canada closed its embassy in Iran and expelled all Iranian diplomats in Canada after denouncing Tehran as the biggest threat to global security, mainly over its nuclear program and military assistance to Syrian President Bashar al-Assad.

After reaching a landmark nuclear deal with world powers in July last year, Iran is seeking to end its long isolation with the West.

However, Tehran's potential opening up to the West after last year's nuclear deal has alarmed Iranian hardliners.

Iran's Revolutionary Guards have arrested at least seven dual-nationality citizens, or expatriates visiting Iran in the last year, the highest number of Iranians with dual nationality acknowledged to have been detained in recent years.