An Iranian woman threatened with expulsion from Canada next week has received a two-year residency permit.

The federal government granted the permit to Roghayeh Azizi Mirmahaleh today, five days before her scheduled deportation to Iran.

Supporters say they learned of the permit this morning and her lawyer Stephanie Valois tells Radio-Canada she has been released.

Mirmahaleh had been held at a detention centre in Quebec after her arrest this week by Canada Border Services Agency agents.

She was denied refugee status because of her ties to an Iranian group once deemed by Canada to be a terrorist organization.

The organization no longer appears on Canada's blacklist and her supporters feared she risked being tortured if returned to her native country.