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."
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 al-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 al-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.
On Wednesday, the UN refugee agency said it considered her a legitimate refugee. Australia was among the countries considering her case.
Why did she flee?
Renunciation of Islam is punishable by death in Saudi Arabia.
Under Saudi Arabia's "male guardianship system", a Saudi woman is required to obtain a male relative's approval to apply for a passport, travel outside the country, study abroad on a government scholarship, get married, leave prison, or even exit a shelter for abuse victims.
Ms al-Qunun told the BBC: "I shared my story and my pictures on social media and my father is so angry because I did this... I can't study and work in my country, so I want to be free and study and work as I want."
She also said she was afraid her family would kill her.
Separately, she told AFP she had suffered physical and psychological abuse from her family, including being locked in her room for six months for cutting her hair.
A spokesperson for her family told the BBC that they did not wish to comment and all they cared about was the young woman's safety.
On Friday, Ms al-Qunun wrote on Twitter that she had "some good news and some bad news", before deleting her account. Her friends said she had received death threats online.
Has anything like this happened before?
Yes. Ms al-Qunun's case echoes that of another Saudi woman who was in transit to Australia in April 2017.
Dina Ali Lasloom, 24, was en route from Kuwait via the Philippines but was taken back to Saudi Arabia from Manila airport by her family.
She used a Canadian tourist's phone to send a message, a video of which was posted to Twitter, saying her family would kill her. Her fate on arriving back in Saudi Arabia remains unknown.