Saudi Arabia published new laws early Friday that loosen restrictions on women by allowing any citizen to apply for a passport and travel freely, ending a long-standing guardianship policy that gave men control over women.
The changes are a potential game-changer for Saudi women's rights in the kingdom.
The legal system has long been criticized because it treated women as minors throughout their adult lives, requiring they have a man's consent to obtain a passport or travel abroad.
Often a woman's male guardian is her father or husband, and in some cases a woman's own son.
The changes were widely celebrated by Saudis on Twitter, including posting memes showing people dashing to the airport with luggage and others hailing the 33-year-old crown prince believed to be the force behind these moves.
But the changes also drew backlash from conservatives, who posted clips of senior Saudi clerics in past years arguing in favor of guardianship laws.
Other changes issued in the decrees allow women to register a marriage, divorce or child's birth and to be issued official family documents. It also stipulates that a father or mother can be legal guardians of children.
Being able to obtain family documents could ease hurdles women faced in obtaining a national identity card and enrolling their children in school.
Still in place, however, are rules that require male consent for a woman to leave prison, exit a domestic abuse shelter or marry.
Women, unlike men, still cannot pass on citizenship to their children and cannot provide consent for their children to marry.
Under the kingdom's guardianship system, women essentially relied on the "good will" and whims of male relatives to determine the course of their lives.
There were cases, for example, of young Saudi women whose parents are divorced, but whose father is the legal guardian, being unable to accept scholarships to study abroad because they did not have permission to travel.
Saudi women fleeing domestic abuse and the guardianship system occasionally drew international attention to their plight, as 18-year-old Rahaf al-Qunun did before Canada granted her asylum.
The stories of runaway women have created a flurry of negative headlines for the kingdom.
To leave the country, some Saudi women say they had to hack into their father's phone and change the settings on a government app to allow themselves permission to leave the country.
There were calls in Washington for Google and Apple to block access to the app entirely.
In a lengthy study of Saudi male guardianship laws in 2016, Human Rights Watch criticized it as "system that was ripe for abuse."
The new rules, approved by King Salman and his Cabinet, allow any person 21 and older to travel abroad without prior consent and any citizen to apply for a Saudi passport on their own.
The decrees, issued Wednesday, were made public before dawn Friday in the kingdom's official weekly Um al-Qura gazette. It wasn't immediately clear if the new rules go into effect immediately.
A number of sweeping changes have been promoted by Crown Prince Mohammed bin Salman as he drives an ambitious economic reform plan that encourages more women to enter the workforce.
He was behind lifting the ban on women driving last year, loosening rules on gender segregation and bringing concerts and movie theaters to the country.
He has also led a simultaneous crackdown on activists, including detaining the country's leading women's rights activists who had demanded an end to the very male guardianship rules now being curtailed.
The women, among them Loujain al-Hathloul, are facing trial and allege they were tortured in prison.
The crown prince continues to face widespread international criticism over the killing of Washington Post columnist and critic Jamal Khashoggi at the Saudi consulate in Istanbul last year.
Saudi Arabia has denied any involvement by the prince, while the kingdom's own investigation acknowledged the operation was planned by two of the prince's top aides.
As noted by the Saudi newspaper Arab News, the decrees outlining changes to travel are written in gender-neutral language removing prior restrictions specific to women, rather than outright stating that women no longer need male consent.
News of the changes had been teased in state-linked Saudi media for weeks, possibly to ready the public and to gauge reaction.
The ways in which the decrees were announced and the language used to announce the changes signal how sensitive these moves are among conservatives in the country.
For years, state-backed preachers told the Saudi public that women should not travel longer than a night alone and that this was rooted in Islamic practice.
Other Muslim countries, however, do not have similar restrictions on women's travel.
Still, clerics in Saudi Arabia have supported the imposition of male guardianship based on a verse in the Quran that states men are the protectors and maintainers of women.
Other Islamic scholars argue this misinterprets fundamental Quranic concepts like equality and respect between the sexes.