DUBAI, United Arab Emirates -- Saudi Arabia announced Wednesday that a woman who was detained after wearing a miniskirt in a video that went viral has been released without charge.

Police in Saudi Arabia had arrested the young woman for wearing "immodest clothes" after an outcry from people who say she flagrantly violated the kingdom's conservative Islamic dress code.

The young Saudi woman drew attention over the weekend when the video was shared online of her walking in a historic village north of the capital wearing a miniskirt and crop top, and showing her hair.

Get Breaking News Delivered to Your Inbox

Saudi rules require all women living in the kingdom, including foreigners, to wear long, loose robes known as abayas in public. Most Saudi women also wear a headscarf and veil that covers the face.

A statement released by the Center for International Communication said police released the woman, who was not named. It says she was released Tuesday evening after a few hours of questioning and that she told investigators that the video posted on social media was published without her knowledge.

"She was released without charge and the case has been closed by the prosecutor," the statement said.

It was a rare win for supporters of women's rights in Saudi Arabia, who criticized the public outcry against her, which prompted police to bring her in for questioning. Her release from detention without charge was also unusual. Women who have fled allegedly abusive families have landed in prison without charge, as have women who defied a ban on women driving in Saudi Arabia.

The decision not to press charges also comes as Saudi Arabia overhauls its prosecution system. Last month, King Salman announced that public prosecution powers would be moved from under the interior minister's purview to that of the royal court, directly under the monarch. A new attorney general was also named in the reshuffling.

The country's new 31-year-old heir to the throne, Crown Prince Mohammed bin Salman, has pushed for greater openings in society as part of a wider overhaul plan called Vision 2030. More than half of Saudi Arabia's population is under 25.

The country has been leading a regional boycott on the tiny Gulf nation of Qatar, which has been accused by the Saudis, their allies and President Trump of funding terrorism. Qatar denies the accusations.

Qatari Foreign Minister Sheikh Mohammed bin Abdulrahman al Thani told CBS News White House and senior foreign affairs correspondent Margaret Brennan last month that the country is "commited to countering terrorism."