Saudi Arabia announced on Tuesday that women will be allowed to drive for the first time in the ultra-conservative kingdom next summer, fulfilling a key demand of women's rights activists who faced detention for defying the ban.

The kingdom was the only the country in the world to bar women from driving and for years had garnered negative publicity internationally for detaining women who defied the ban.

>> Get all updates on Israel and the Middle East: Download our free App, and Subscribe >>

The move, which has been welcomed by the United States, represents a significant opening for women in Saudi Arabia, where women's rights have steadily and slowly gained ground over the years. Saudi women remain largely under the whim of male relatives due to guardianship laws.

King Salman and his young son and heir, Crown Prince Mohammed bin Salman, have tested the waters though, allowing women into the country's main stadium in the capital, Riyadh, for national day celebrations this month. The stadium had previously been reserved for all-male crowds to watch sporting events. The king and his son have also opened the country to more entertainment and fun.

Women's rights activists since the 1990s have been pushing for the right to drive, saying it represents their larger struggle for equal rights under the law.

>> One daring Saudi biker's dream to put women in the saddle >>

There is no law banning women from driving in Saudi Arabia, but there is a law requiring citizens to use locally issued licenses while in the country. Such licenses are not issued to women, making it effectively illegal for them to drive.

Saudi Arabia has been widely criticized for being the only country in the world that bans women from driving, despite ambitious government targets to increase their public role, especially in the workforce.

Some ultraconservative clerics in Saudi Arabia, who wield power and influence in the judiciary and education sectors, had warned against allowing women to drive. They argued it would corrupt society and lead to sin.

Women in Saudi Arabia have long had to rely on male relatives to get to work, run errands and simply move around. The more affluent have male drivers and more recently, in major cities, women could access ride hailing apps like Uber and Careem.

According to Amnesty International, Saudi women have been sentenced to lashes for challenging the ban on driving. The sentence was reported in September 2011, two days after Saudi King Abdullah granted women the right to vote and run in municipal elections.

"Flogging is a cruel punishment in all circumstances but it beggars belief that the authorities in Saudi Arabia have imposed lashes on a woman apparently for merely driving a car," an Amnesty regional deputy director said at the time.

'Step in the right direction'

The state-run Saudi Press Agency and state TV reported the news late Tuesday evening, saying King Salman decreed that both men and women to be issued drivers' licenses.

Women, however, will not be allowed to obtain licenses immediately. A committee will be formed to look into how to implement the new order, which is slated to come into effect in June 2018.

The kingdom had held out on allowing women to drive, despite a number of social openings and gains for women, including granting women the right to vote and run in elections for the first time in late 2015.

U.S. President Donald Trump commended the decision and called it "a positive step toward promoting the rights and opportunities of women in Saudi Arabia." He noted that the United States will continue to support the country "in its to efforts to strengthen Saudi society and the economy through reforms like this."

State Department spokeswoman Heather Nauert said the U.S. is "happy" with the move, calling it "a great step in the right direction for that country." She did not comment on whether Saudi Arabia still needs to do more to ensure full rights for its female citizens.

Reuters contributed to this report.