On the evening of Saturday, 5 January, a desperate situation began to unravel on a newly created Twitter account.
Fleeing her Saudi family in Kuwait, Rahaf Mohammed al-Qunun, 18, sent out a series of tweets pleading for help from an airport hotel room in Bangkok.
At the time she had 24 followers.
"I'm the girl who ran away to Thailand. I'm now in real danger because the Saudi embassy is trying to force me to return," her first-ever tweet in Arabic read.
اسمي رهف محمد، و سأقوم بنشر اسمي الكامل على الملاء إذا لم تتوقف عائلتي والسفاراة السعودية، ورجل السفارة الكويتية عن مطاردتي.— Rahaf Mohammed رهف محمد (@rahaf84427714) January 5, 2019
Then she said something that would be hard to ignore: "I'm afraid. My family will kill me."
People noticed and the first tweet with the hashtag #SaveRahaf was sent out.
Within minutes of that, Egyptian-American activist Mona Eltahawy translated the Arabic tweets into English and sent it to her hundreds of thousands of followers.
A few hours later that tweet caught the attention of Human Rights Watch and eventually Phil Robertson, its Bangkok-based Asia deputy director, who sent this out.
18 year old Saudi woman Rahaf Mohammed Al-Qunun is being held at #Bangkok airport, her passport confiscated by #SaudiArabia which prevented her from continuing to #Australia. She wants to seek asylum, fears she will be killed if forced back to #Riyadh. Needs access to #UNHCR! pic.twitter.com/7yEGI1KKcb— Phil Robertson (@Reaproy) January 6, 2019
By the early hours of Sunday he was engaged in a direct Twitter message exchange with Ms Mohammed al-Qunun, guiding the young woman in her dealings with authorities at the airport.
Despite that she kept up her barrage, live tweeting every minute of her ordeal and putting out videos that showed everything that was happening to her at the airport. Over the course of Sunday, her posts became more and more fevered.
The fear and desperation she conveyed through the tweets drew sympathy and support from the Twitter community.
Tweets carrying the #SaveRahaf hashtag continued to gain momentum and by mid-Sunday afternoon, it was in more than half a million tweets, according to Twitter.
An unknown teenager from Saudi Arabia that no-one had ever heard of had gone from 24 followers to more than 27,000 in the span of less than 24 hours.
"When I heard Rahaf Mohammed al-Qunun's public statement that she renounced her religion, I knew things would go very bad for her if she was sent back to Saudi Arabia," Human Rights Watch's Phil Robertson told BBC News.
"At that point, there was no question in my mind - she needed our help."
Renouncing Islam, or apostasy, is a crime punishable by death in Saudi Arabia.
"Twitter aims to provide a platform where marginalised voices can be seen and heard. This is fundamental to who we are and crucial to the effectiveness of our service," an official statement to the BBC read.
This is where it gets dramatic
On Monday morning, the situation took a turn for the worse, with the arrival of Thai immigration authorities at Ms Mohammed al-Qunun's hotel room to deport her to Kuwait.
Following their direct message exchange on Twitter, Ms Mohammed al-Qunun heeded the advice of Human Rights Watch not to surrender her mobile phone under any circumstances.
And it proved to be a crucial piece of advice.
SA charge d'affaires in Bangkok Mr. Al-Shuaibi in a meeting with Thai officials:— Taleb Al Abdulmohsen (@DrTalebJawad) January 8, 2019
"She opened a Twitter account and her followers grew to 45000 within one day. It would have been better if they confiscated her cell phone instead of her passport because Twitter changed everything" pic.twitter.com/FEjPjUbteV
The frantic teenager barricaded herself in with Australian journalist Sophie McNeill, refusing to board the flight. Instead, she relentlessly continued documenting the ordeal on Twitter.
After that her followers doubled in number to more than 66,400.
The BBC's South East Asia correspondent Jonathan Head, who was part of a network of foreign journalists closely charting Rahaf Mohammed al-Qunun's case, said the enormous publicity driven by social media was a big factor in what happened to her.
"Rahaf Mohammed al-Qunun was a frightened, young woman. Interest in Rahaf's plight drove her own Twitter following up by the time Thai authorities planned to deport her on Monday morning.
"This was a very powerful human story happening in real time, whose ending was uncertain."
Thailand’s immigration police chief Gen. ‘Big Joke’ Surachate has promised not to force @rahaf84427714 back to Kuwait and said the Thais believe her life is at risk if she does. Police trying to negotiate with her through her door now. She only wants to talk to the UN.— Jonathan Head (@pakhead) January 7, 2019
"In building support and response to crisis situations, Twitter was the perfect social media tool for Rahaf Mohammed al-Qunun because it enabled the rapid sharing of information," Phil Robertson added.
"The surge of support on Twitter [not only] caught the attention of reporters and editors, it helped engage the mainstream Thai media.
"Her tweets also attracted attention from local diplomats as well as the highest levels of UNHCR and governments to the situation.
"This was all pivotal in prompting Thailand to re-think their approach once it was clear that Rahaf Mohammed al-Qunun would not go quietly."
"As of Sunday night Thai officials were adamant she would be sent back and Thai media had still not reported the story, by Monday morning that had changed," said the BBC's Jonathan Head.
Today Ms Mohammed al-Qunun is safe, having been declared a legitimate refugee by the UN.
Young and social-savvy, Rahaf Mohammed al-Qunun was able to take things into her own hands by successfully mobilising a solid online campaign to protect herself.
She has come out of this ordeal with 126,000 followers on Twitter in the five days her account has been active.
In another case where social media was used in a similar way a Syrian man stranded at a Malaysian airport for months managed to successfully seek asylum in Canada after campaigning for his cause on Twitter and Facebook.
But not everyone facing a threat to their life has been as lucky.