A Saudi terrorism court has sentenced prominent women’s rights activist Loujain al-Hathloul to five years and eight months in prison, local media reported, despite international criticism of her detention and pressure to release her.

State-linked Saudi news outlet Sabq reported on Monday that al-Hathloul had been found guilty by the court on charges including agitating for change, pursuing a foreign agenda and using the internet to harm public order.

The court suspended two years and 10 months of her sentence. She has 30 days to appeal the verdict. Al-Hathloul, 31, has been in custody since 2018 after being arrested along with at least a dozen other women’s rights activists.

Al-Hathloul’s case, and her imprisonment for the past two and a half years, have drawn criticism from rights groups, members of the US Congress and European Union lawmakers.

According to rights group ALQST, court documents in al-Hahtloul’s trial are rife with “gross judicial flaws”, including evidence from the prosecution where she is said to have confessed to actions related to her human-rights activism.

“The more information that comes to light from Loujain al-Hathloul’s trial, the more apparent it becomes how deeply flawed the whole process is,” said ALQST’s Executive Director Alaa Al-Siddiq. “From the charge sheet and entire evidence relating simply to her peaceful activism, to the deplorable use of the terrorism court and Counter-Terrorism Law, the Saudi authorities are making a mockery of justice, and the international community must call this out.”

Rights organisations have documented the torture and sexual violence al-Hathloul has been subjected to since her arrest.

According to her family members, some of the torture sessions have been in the presence of Crown Prince Mohammed bin Salman’s close aide Saud al-Qahtani.

According to the Sabq outlet, the judge said the verdict was issued in the presence of the prosecutor, the defendant, a representative from the government’s Human Rights Commission and a handful of select local media representatives.

Al-Hathloul had also been jailed in 2014, after Saudi authorities put her in juvenile detention when she tried to drive into the kingdom from the neighbouring United Arab Emirates.

She was freed 73 days later following an international campaign.