The longstanding driving ban was seen internationally as a symbol of repression of women in the Gulf kingdom and its repeal comes after years of resistance from female activists.
The shock announcement, which risks riling religious conservatives, is part of Saudi Arabia's ambitious reform push aimed at adapting to a post-oil era and improving a global reputation battered by its human rights record.
"King Salman bin Abdulaziz al Saud has issued a decree authorising the issuance of drivers' licences for women in the kingdom," Saudi state TV said.
"The decree will take effect in June 2018."
Related reading
Saudi official axed over king image with 'Star Wars' icon
Saudi Arabia will use the "preparatory period" until then to expand licensing facilities and develop the infrastructure to accommodate millions of new drivers, the announcement added.
Conservative clerics in Saudi Arabia, an absolute monarchy ruled according to sharia law, have long justified the ban arguing that lifting it would lead to promiscuity. One of them claimed that driving harmed women's ovaries.
Many women's rights activists have been jailed for flouting the ban.
The surprise announcement was widely welcomed, both at home and abroad.
"A glorious day. Can't hold back my tears," tweeted Saudi shura council member Latifah Alshaalan. "Congratulations to the women of my homeland."
Activist Manal al-Sharif, who led the 2011 "Women2Drive" protest movement, tweeted: "Today, the last country on earth to allow women to drive... we did it."
"It is a testimony to the bravery of women activists who have been campaigning for years that... Saudi Arabia has finally relented and decided to permit women to drive," rights watchdog Amnesty International said.
Tight restrictions
Saudi Arabia has some of the world's tightest restrictions on women.
Under the country's guardianship system, a male family member -- normally the father, husband or brother -- must grant permission for a woman's study, travel and other activities.
It was unclear whether women would require their guardian's permission to apply for a driving licence.
After Tuesday's historic announcement, the hashtags "I am my own guardian" and "Saudi Women Can Drive" began gaining traction on social media, while many openly lampooned conservatives who long favoured the ban.
One Saudi woman tweeted a picture of three women in a convertible going shopping, with the message: "Us soon."
The policy could socially liberate women -- heavily reliant on foreign drivers and ride-sharing apps -- and also boost the economy at a time of low oil prices by increasing their participation in the workforce, experts say.
The announcement follows a dazzling gender-mixed celebration of Saudi national day at the weekend, the first of its kind, which aimed to spotlight the kingdom's reform drive despite a backlash from religious conservatives.
Men and women danced in the streets to drums and electronic music, in scenes that are a stunning anomaly in a country known for its tight gender segregation and an austere vision of Islam.
Women were also allowed into a sports stadium -- previously a male-only arena -- to watch a concert, a move that chimes with the government's Vision 2030 plan for social and economic reform.
With more than half the country aged under 25, Crown Prince Mohammed bin Salman, the king's son and the architect of Vision 2030, is seen as catering to the aspirations of younger people.
'A great step'
US President Donald Trump welcomed the decision as "a positive step toward promoting the rights and opportunities of women in Saudi Arabia", according to a White House statement.
The US State Department called it a "great step in the right direction", echoing a similar comment from UN Secretary General Antonio Guterres.
Tuesday's announcement comes at a crucial time for Saudi Arabia.
The oil kingpin is in a battle for regional influence with arch-rival Iran, bogged down in a controversial military intervention in neighbouring Yemen and at loggerheads with fellow US Gulf ally Qatar.
"Allowing women to drive is the biggest PR win that Saudi Arabia -- and Prince Mohammed -- could have in a single swoop," said Jane Kinninmont, from London's Chatham House.
Already viewed as the de facto ruler controlling all the major levers of government, heir apparent Prince Mohammed, 32, is seen as stamping out traces of internal dissent before any formal transfer of power from his 81-year-old father.
His gambit to loosen social restrictions, which has so far not translated into more political and civil rights, seeks to ease criticism over a recent political crackdown, some analysts say.
Authorities this month arrested more than two dozen people, including influential clerics and activists, in what critics decried as a coordinated crackdown.