Campaigners say Saudi 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, made late on Tuesday, comes into effect next summer – 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 were able to drive freely, the kingdom maintained its blanket ban in the face of those protests.

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 the move 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”.

“As a longstanding friend of Saudi Arabia, I welcome the kingdom taking this important step towards gender equality," she said.

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.

In 2011, one woman was sentenced to 10 lashes for being caught driving. Her sentence was later overturned.

Another woman, Manal al-Sharif, an information security consultant for a multinational company in Saudi Arabia, was arrested in the same year after uploading a video to YouTube showing her behind the wheel.

She was detained for breaking the law banning women driving but was released following an international outcry and has written her own memoir, Daring To Drive: A Saudi Woman’s Awakening.

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.

But women still lack many rights and are not allowed to travel without the permission of a male guardian or open a bank account without their husbands' permission.

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

Amnesty International’s Philip Luther said: “It is a testament to the bravery of women activists who have been campaigning for years that the government of Saudi Arabia has finally relented and decided to permit women to drive.

“This is a long overdue small step in the right direction and we welcome this move if it means all women in Saudi Arabia will finally be able to drive without any restrictions.

“If, by June next year, women in Saudi Arabia are driving the streets without fear of arrest, then this will be a cause for celebration. But it is just one step.

"We also need to see a whole range of discriminatory laws and practices swept away in Saudi Arabia, including the guardianship system where every woman has a male guardian, be it their father, brother, husband or son, having authority to make decisions on her behalf.”