Video caption The #SaveRahaf campaign went viral after Rahaf started tweeting about her plight for asylum

A Saudi woman who fled her family and refused to leave a Bangkok hotel has been declared a legitimate refugee by the UN, the Australian government says.

Rahaf Mohammed al-Qunun, 18, refused to board a flight from Bangkok to Kuwait on Monday and barricaded herself into her airport hotel room.

She said she had renounced Islam, which is punishable by death in Saudi Arabia.

The UN's refugee agency has referred her case to Australia for possible resettlement.

Thai immigration officials had initially said she should return to Kuwait, where her family were waiting. She then started a social media campaign, live-tweeting her case and attracting international attention.

Image copyright EPA/THAI IMMIGRATION BUREAU Image caption Rahaf Mohammed al-Qunun, picturedflight on 4 January.

She was trying to head to Australia via a connecting flight in Bangkok.

Because she did not have a visa to enter Thailand, Thai police had denied her entry and were in the process of repatriating her, an official said.

Image copyright Reuters Image caption Police in Thailand had denied entry to the woman and were in the process of repatriating her

She began to live-tweet her ordeal, sharing her Twitter password with friends so they too could assist in spreading the message on social media. But some social media users in her own country strongly criticized her actions.

A video showed how she resisted deportation efforts by hiding in an airport hotel room, putting a table against the door to stop people from entering.

She told the BBC: "I