Campaigners say S audi Arabia's surprise decision to grant women the right to drive is only the start of a long journey towards equality in the conservative kingdom.
Saudi Arabia was the only country in the world to ban women from driving.
The royal decree late on Tuesday comes into effect next summer, but it comes nearly three decades after women began agitating for the right to drive.
As recently as 2013, dozens of women uploaded videos online of themselves behind the wheel of a car during a campaign launched by Saudi rights activists.
Some videos showed families and male drivers giving women a "thumbs-ups", suggesting many were ready for the change.
While women in other Muslim countries drove freely, the kingdom's blanket ban attracted negative publicity.
Neither Islamic law nor Saudi traffic law explicitly prohibited women from driving, but they were not issued licences and were detained if they attempted to drive.
The decision to change course and grant women licences was praised by the White House, which said President Donald Trump views the change as "a positive step toward promoting the rights and opportunities of women in Saudi Arabia".
The secretary-general of the United Nations Antonio Guterres described it as "an important step in the right direction".
Prime Minister Theresa May also hailed the decision, saying the empowerment of women around the world "is key to nations' economic development".
Prince Khaled bin Salman, Saudi Arabia's ambassador to Washington and the king's son, said letting women drive is a "huge step forward" and that "society is ready".
"This is the right time to do the right thing," he told reporters.
Aziza Youssef, a professor at King Saud University and one of Saudi Arabia's most vocal women's rights activists, said women were "happy" but also that the change was "the first step in a lot of rights we are waiting for".
"I am really excited. This is a good step forward for women's rights," she said.
Saudi history offers many examples of women being punished simply for operating a vehicle.
In 1990, 50 women were arrested for driving and lost their passports and their jobs.
More than 20 years later, a woman was sentenced in 2011 to 10 lashes for driving, though the late king Abdullah overturned the sentence.
As recently as late 2014, two Saudi women were detained for more than two months for defying the ban on driving when one of them attempted to cross the Saudi border with a licence from neighbouring United Arab Emirates in an act of defiance.
The decree indicated women will not be allowed to drive immediately.
A committee will be formed to look into how to implement the new order, which is to take effect in June 2018.
For years, the kingdom has incrementally granted women more rights and visibility, including participation in the Olympic Games in London and Rio de Janeiro, positions on the country's top consultative council and the right to run and vote in local elections in 2015.
Saudi rights activist Sahar Nasief, who lives in in the Red Sea city of Jeddah, has for years been involved in the campaign for women to drive.
"I am very optimistic about the future," she said.
"Things have to change. People are demanding it. Young people don't want to live the way we lived.
"They want to live better. They want to live how other people are living."