BANGKOK — An 18-year-old Saudi woman who expressed fear that she would be killed if sent back to her family was allowed to remain in Thailand on Monday evening, ending a tense 48-hour drama at Bangkok’s main international airport.

The young woman, Rahaf Mohammed Alqunun, was on the verge of being deported earlier in the day at the request of the Saudi government. But after she and human rights advocates mounted a global social media campaign, Thai immigration officials agreed not to send her home.

“Thailand is a land of smiles. We will not send someone back to die,” said the country’s immigration chief, Maj. Gen. Surachate Hakparn. “We will take care of her as best as we can.”

After meeting with Ms. Alqunun and officials from the United Nations refugee agency Monday afternoon, General Surachate said that Ms. Alqunun had been allowed to leave the airport with agency representatives. They will take up to 10 days to process her request for refugee status and find a country that will accept her.