A short video of a Saudi woman walking around in a miniskirt and crop top sparked an outcry after going viral, leading to the woman being detained for several hours.

The woman was eventually released without charge, but the incident and the online debate it ignited point to the tension in Saudi Arabia between proponents of its conservative, state-enforced strictures and those pushing for greater rights.

Here's a look at why the video caused such an uproar.

The woman, whose name has not been released, defied the kingdom's conservative dress code, which requires all women, even foreigners, to wear long, loose robes known as abayas in public. Most Saudi women also cover their hair and face with black veils.

It is common in Saudi Arabia to see heavily blurred or pixilated images of women's faces on billboards and storefronts — in stark contrast to the many towering images of senior male royals displayed across the country.

In some segments of society, even uttering a woman's name in public is taboo.

High-level foreign dignitaries have been the exception to the rule. German Chancellor Angela Merkel, American First Lady Melania Trump and the President's daughter, Ivanka, did not cover their hair or wear abayas on official visits to Saudi Arabia this year, though they did dress modestly.

Last December another Saudi woman posted a picture of herself in public without the abaya on, but she was wearing a black coat and a long, colourful skirt. She was detained and interrogated for five days. Her current legal status is unclear.

Saudi Arabia is a deeply conservative country that is governed by an austere interpretation of Islam widely known as Wahhabism, which draws heavily on the kingdom's tribal and patriarchal customs.

The country is home to Islam's holiest sites in Mecca and Medina, which draw millions of Muslim around the world for pilgrimage.

The kingdom is ruled by a monarch whose power is rooted in the support of influential Wahhabi clerics. Saudi judges also adhere to conservative interpretations of the faith.

Other countries are governed by Islamic law, but none enforce the Saudi government's strict interpretation of it. Foreign women wear bathing suits on public beaches in nearby Dubai, and can be seen in jeans and shorter dresses at malls in Kuwait and Qatar. In Iran, and among ultraorthodox Jews in Israel, women are required to dress modestly.

Cafes and restaurants in Saudi Arabia are typically gender-segregated, requiring women to enter through separate doors and be seated out of view of single men.

It remains illegal for women to drive in Saudi Arabia. Women also need the consent of a male relative, usually a father or husband, before they are allowed to travel abroad or obtain a passport.

Despite some openings for women in recent years, clerics in Saudi Arabia have spoken out against women driving and against women working jobs where they might interact with unrelated males. Most universities and schools are segregated by gender.

Most Saudi women who do work are in teaching jobs, though women have also run in local elections and hold posts in the country's top consultative body, the Shura Council.

Saudi Arabia curbed the powers of the religious police last year.

The all-male force can no longer make arrests or pursue people in car chases, though they still patrol the streets and public places ensuring unrelated men and women are not mingling.

The religious police, officially known as the Commission for the Promotion of Virtue and Prevention of Vice, ensure that both women and men are dressed modestly. Men can run afoul of the rules by wearing shorts that stop above the knee or by sporting long or outlandish hairstyles.

After the miniskirt video surfaced, the religious police referred the case to other agencies to investigate it. The woman was questioned by security officials in Riyadh.

Last month, the king named his son as heir to the throne. Crown Prince Mohammed bin Salman , 31, has spearheaded a Vision 2030 plan to overhaul the country, including modernising aspects of society.

10 examples of Saudi Arabia's human rights abuses Show all 10 1 /10 10 examples of Saudi Arabia's human rights abuses 10 examples of Saudi Arabia's human rights abuses In October 2014, three lawyers, Dr Abdulrahman al-Subaihi, Bander al-Nogaithan and Abdulrahman al-Rumaih , were sentenced to up to eight years in prison for using Twitter to criticize the Ministry of Justice. AFP/Getty Images 10 examples of Saudi Arabia's human rights abuses In March 2015, Yemen’s Sunni President Abd-Rabbu Mansour Hadi was forced into exile after a Shia-led insurgency. A Saudi Arabia-led coalition has responded with air strikes in order to reinstate Mr Hadi. It has since been accused of committing war crimes in the country. Getty Images 10 examples of Saudi Arabia's human rights abuses Women who supported the Women2Drive campaign, launched in 2011 to challenge the ban on women driving vehicles, faced harassment and intimidation by the authorities. The government warned that women drivers would face arrest. Getty Images 10 examples of Saudi Arabia's human rights abuses Members of the Kingdom’s Shia minority, most of whom live in the oil-rich Eastern Province, continue to face discrimination that limits their access to government services and employment. Activists have received death sentences or long prison terms for their alleged participation in protests in 2011 and 2012. Getty Images 10 examples of Saudi Arabia's human rights abuses All public gatherings are prohibited under an order issued by the Interior Ministry in 2011. Those defy the ban face arrest, prosecution and imprisonment on charges such as “inciting people against the authorities”. Getty Images 10 examples of Saudi Arabia's human rights abuses In March 2014, the Interior Ministry stated that authorities had deported over 370,000 foreign migrants and that 18,000 others were in detention. Thousands of workers were returned to Somalia and other states where they were at risk of human rights abuses, with large numbers also returned to Yemen, in order to open more jobs to Saudi Arabians. Many migrants reported that prior to their deportation they had been packed into overcrowded makeshift detention facilities where they received little food and water and were abused by guards. Getty Images 10 examples of Saudi Arabia's human rights abuses The Saudi Arabian authorities continue to deny access to independent human rights organisations like Amnesty International, and they have been known to take punitive action, including through the courts, against activists and family members of victims who contact Amnesty. Getty Images 10 examples of Saudi Arabia's human rights abuses Raif Badawi was sentenced to 1000 lashes and 10 years in prison for using his liberal blog to criticise Saudi Arabia’s clerics. He has already received 50 lashes, which have reportedly left him in poor health. Carsten Koall/Getty Images 10 examples of Saudi Arabia's human rights abuses Dawood al-Marhoon was arrested aged 17 for participating in an anti-government protest. After refusing to spy on his fellow protestors, he was tortured and forced to sign a blank document that would later contain his ‘confession’. At Dawood’s trial, the prosecution requested death by crucifixion while refusing him a lawyer. Getty Images 10 examples of Saudi Arabia's human rights abuses Ali Mohammed al-Nimr was arrested in 2012 aged either 16 or 17 for participating in protests during the Arab spring. His sentence includes beheading and crucifixion. The international community has spoken out against the punishment and has called on Saudi Arabia to stop. He is the nephew of a prominent government dissident. Getty

Also 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.

As part of Vision 2030, the government has pushed for there to be more entertainment for youth, allowing musical concerts that were once banned and even a Comic-Con event.

The kingdom announced last week that girls would be allowed for the first time to play sports in public school and have access to physical education classes.