Prime Minister Justin Trudeau announced that Canada was taking in an 18-year-old Saudi seeking asylum who fled her family and harnessed the power of Twitter to stave off deportation from Thailand.
Rahaf Mohammed al-Qunun was already en route to Toronto late today when the prime minister made the surprise announcement, after officials had previously given heavy hints she was bound for Australia.
"Canada has been unequivocal that we'll stand up for human rights and women's rights around the world," Mr Trudeau said.
"When the United Nations made a request of us that we grant al-Qunun's asylum, we accepted."
The move is sure to further strain Canadian relations with the kingdom that went sideways last August over Ottawa's rights criticism of Saudi Arabia, prompting Riyadh to expel the Canadian ambassador and sever all trade and investment ties in protest.
Canada also sparked fury in Riyadh by demanding the "immediate release" of jailed rights campaigners, including Samar Badawi, the sister of jailed blogger Raif Badawi, whose family lives in Quebec.
Ms Qunun's attempt to flee the ultra-conservative kingdom was embraced by rights groups as a beacon of defiance against repression.
Thai authorities initially threatened to deport her after she arrived in Bangkok from Kuwait last weekend.
But armed with a smartphone and hastily opened Twitter account, she forced a U-turn from Thai immigration police who handed her into the care of the UN's refugee agency as the #SaveRahaf hashtag bounced across the world.
Ms Qunun alleged that she was abused by her family - who deny the allegations - and rights groups also said she had renounced Islam, risking prosecution in Saudi Arabia.
She first said she was aiming for Australia where officials had suggested they would give serious consideration to her claim for asylum, which was endorsed as legitimate by the UNHCR on Wednesday.
But late today Thailand's immigration police chief said a smiling and cheerful Rahaf was bound for Toronto and had left on a flight after 11pm local time.
"She chose Canada... Canada said it will accept her," Thai immigration chief Surachate Hakparn told reporters at Bangkok's main airport.
"She is safe now and has good physical and mental health. She is happy."
Ms Qunun left from the same airport where her quest for asylum began less than a week ago in a swift-moving process that defied most norms.
This afternoon, Ms Qunun posted a final cryptic tweet on her profile saying "I have some good news and some bad news" - shortly after her account was deactivated in response to death threats she had faced, her friends said.
"Rahaf received death threats and for this reason she closed her Twitter account, please save Rahaf life," tweeted supporter @nourahfa313, who has flanked Ms Qunun 's social media campaign with her own updates on Twitter.
Ms Qunun’s swift use of Twitter saw her amass more than 100,000 followers within a week, highlighting her plight at a time when Saudi Arabia's human rights record is under heavy scrutiny following the murder of journalist Jamal Khashoggi last year.
Her deployment of social media allowed her to avoid the fate of countless other refugees who are quietly sent back home or languish in Bangkok detention centres.
She refused to see her father who travelled to Thailand and expressed opposition to her resettlement.