Saudi Arabia has released Loujain al-Hathloul, a prominent women’s rights activist, after nearly three years in prison in a case that drew widespread criticism and intensified scrutiny on the kingdom’s rights record.

Hathloul, who rose to prominence campaigning to end a ban on women driving, was among more than 10 female activists detained in May 2018 as Crown Prince Mohammed bin Salman, the kingdom’s day-to-day leader, launched waves of crackdowns that targeted businessmen, royals, bloggers, academics and activists.

Speaking at the Pentagon on Wednesday, US president Joe Biden welcomed news of her release by the Saudi government, describing her as “a prominent human rights activist”. “She was a powerful advocate for women's rights and releasing her was the right thing to do,” he said.

In December, the 31-year-old was sentenced to nearly six years in prison by an anti-terrorism court after being charged with incitement to change the absolute monarchy’s political system, serving a foreign agenda and co-operating with individuals and entities accused of violating the kingdom’s anti-terrorism act.

Rights groups had condemned the trial, calling it a travesty of justice.

Two years and 10 months of her sentence was suspended and her release was expected, but she was banned from travel for five years.

“Loujain is at home !!!!!!” her sister Lina tweeted.

Her release comes as Biden is expected to put greater scrutiny on Prince Mohammed after pledging to “reassess” the US relationship with Saudi Arabia and to ensure that human rights would be a priority “even with our closest security partners”.

Washington is reviewing arms sales to the kingdom agreed under former US president Donald Trump, who stood by Prince Mohammed when Riyadh endured its biggest diplomatic crisis in years after Saudi agents murdered veteran journalist Jamal Khashoggi in October 2018.

Jake Sullivan, US national security adviser, who criticised Hathloul’s sentencing in December, welcomed her release. “Pleased to see the release of Loujain al-Hathloul,” he wrote on Twitter, “This is a good thing.”

Prince Mohammed has spearheaded sweeping changes in recent years after pledging to modernise the ultra-conservative kingdom and reform its oil-dependent economy. However, the easing of social restrictions under his watch has been accompanied by crackdowns against any hint of dissent.

Hathloul and her fellow activists were detained just weeks before the ban on women driving was lifted in what was widely interpreted as a signal from the authorities that they would quash all forms of activism.

Hathloul’s family alleged that she had been tortured during her detention, but a court in December cleared the authorities, saying there was no evidence to support the claims.

Rights groups say scores of activists remain in prison.

Activists welcomed Hathloul’s release but called for her travel ban to be lifted and for those who allegedly mistreated her to be brought to justice.

“Now, a new battle begins, to lift the travel ban on her, hold the culprits accountable and call for all prisoners of conscience to be really free,” said Abdullah Alaoudh, Gulf research director at Democracy for the Arab World Now, an advocacy group.

“While we celebrate Loujain’s release from prison, we cannot say that she is free. If she is not allowed to leave Saudi Arabia, or is forced to remain on probation, there is no reason to believe she will not be arrested again or forced to remain subject to her country’s draconian laws that prevent her from speaking out and demanding her basic rights.”

Additional reporting by Katrina Manson in Washington