Thailand’s military government has historically been hostile to asylum seekers. That why the case of Rahaf Mohammed Alqunun, an 18-year-old Saudi woman who fled her family this past week, is puzzling to some.

When Alqunun landed in Thailand on Saturday, she became a prisoner. Rather than allowing her to fly to Australia and seek asylum, Thai officials detained her in a hotel and prepared to send her back to the Middle East.

But then, just two days later, they suddenly changed their plans: Alqunun was allowed to stay in Thailand and apply for refugee status, which she says she needs as protection from her abusive family. In record time she appeared to have been approved and the U.N. refugee agency referred her case for resettlement to Australia, which said Wednesday it was considering it.

That’s not how it generally goes in Thailand. In 2018, according to Human Rights Watch, Thailand detained thousands of people, including many Pakistani asylum seekers, during an immigration crackdown called Operation X-Ray Outlaw Foreigner. In November, the country detained a Bahraini former soccer player named Hakeem al-Araibi, who was living as a refugee in Australia after speaking out against a Bahraini official.

So why did the country back down in Alqunun’s case? Here are three potential reasons.

Social media

An obvious reason may be the global attention Alqunun attracted on Twitter. The Saudi teen posted videos from inside the hotel room where she was being held, documenting her refusal to emerge until she was put in contact with UNHCR, the refugee agency.

Abdalelah Mohammed A. al-Shuaibi, the chargé d’affaires at the Saudi Embassy in Thailand, said during a Tuesday meeting with Thai officials that “we wish they had confiscated her phone instead of her passport,” according to CNN.

Increased scrutiny on Saudi Arabia

Another factor may be growing international disapproval of Saudi Crown Prince Mohammed bin Salman’s brutal war in Yemen and the killing of Saudi journalist Jamal Khashoggi, apparently at the hands of the Saudi government.

“You could argue that in this post-Khashoggi era, no nation would want to bend over backward to help the Saudis,” said Michael Kugelman, deputy director of the Asia program at the Wilson Center.

“Even authoritarian states do give mind to reputational considerations."

Icy diplomacy

But history could be playing a role as well — namely the mysterious events surrounding a 1989 jewel heist that caused a diplomatic freeze between the two countries.

It all began when a Thai gardener working for a Saudi prince stole as much as 200 pounds of jewelry from the family (he is rumored to have wheeled the booty out of the estate in a vacuum cleaner) and then fled home to Thailand. When Thai authorities returned the jewels to Saudi Arabia, the family found that many of them were cheap fakes. They sent Saudi officials to Thailand to investigate, but three of the diplomats were mysteriously murdered.

Kugelman said relations between the two countries have vastly improved since the heist, but some scars apparently remain. In 2010, according to the Economist, Thai Muslims were still being held in limbo waiting for visas for their pilgrimages to Mecca.

Lily Lines: This affects new dads more than many think

Plus, how Europe’s far-right politicians are cracking down on gender studies

Forget gender reveals. In Brazil, it’s all about fancy C-section parties.

The operations have long been a status symbol among the country’s elite

The battle of bra-baring waitresses and ultrareligious protesters explains Israel’s central tension. Here’s how.

Netanyahu’s political crisis is due to the fight between secular and ultra-Orthodox Jews