A Saudi woman who fled her family and became stranded at Bangkok's main airport is flying to Canada after being granted asylum status.
Rahaf Mohammed al-Qunun, 18, had been trying to reach Australia via Bangkok, but was initially told to return to Kuwait, where her family were waiting.
She refused to fly back and barricaded herself into her airport hotel room, attracting international attention.
She said she had renounced Islam, which is punishable by death in Saudi Arabia.
The UN's refugee agency has said it considers her to be a legitimate refugee.
Refugee status is normally granted by governments, but the UNHCR can grant it where states are "unable or unwilling to do so", according to its website.
Canadian Prime Minister Justin Trudeau told reporters: "Canada has been unequivocal that we will always stand up for human rights and women's rights around the world. When the UN made a request of us that we grant Ms al-Qunun asylum, we accepted."
Canada has previously angered Saudi Arabia after calling for the release of detained women's rights activists in the country - prompting Riyadh to expel Canada's ambassador and freeze all new trade.
The UNHCR has welcomed Canada's decision to resettle Ms Qunun.
What happened to Rahaf Mohammed al-Qunun?
She was on a trip to Kuwait with her family, when she fled on a flight to Bangkok.
She said she intended to take a connecting flight to Australia - and had an Australian visa - but that her passport was seized by a Saudi diplomat when he met her coming off the flight at Suvarnabhumi airport, leaving her stranded.
A Saudi envoy in Bangkok denied any official Saudi involvement in Ms Qunun's detention.
Thai officials initially described her case as a "family problem" and said she would be repatriated back to Kuwait the next day.
However, Ms Qunun sent a series of tweets pleading for help from her airport hotel room, and her case was picked up by Human Rights Watch and journalists.
A number of countries, including Australia, have considered her case for asylum.