ISTANBUL — A court in Saudi Arabia on Monday sentenced Loujain al-Hathloul, one of the country's most prominent women's rights advocates, to a prison term of five years and eight months after convicting her on terrorism-related charges, her family said in a statement.

Human rights groups said the charges were based solely on Hathloul’s activism: her contacts with journalists, diplomats and other human rights advocates, as well as her calls to end a system of male “guardianship” in the kingdom, according to the indictment.

The court suspended a portion of her sentence and included time served, so Hathloul could be released in approximately two months, her family said in a news release.

Hathloul, 31, is perhaps best known for campaigning for the right of Saudi women to drive. She has been in custody since May 2018 and was arrested as part of a government roundup of prominent women’s rights advocates, some of whom were branded as “traitors” in government-friendly news outlets and initially accused of aiding the kingdom’s foreign enemies.

Weeks after the arrest, the Saudi government granted women the right to drive. Prosecutors have yet to make public any evidence that Loujain or the other activists colluded with a foreign state.

On June 24, 2018, Saudi Arabia lifted a ban that prevented women from driving. Woman across the country shared their experiences. (Allie Caren/The Washington Post)

The sentence was significantly lighter than the 20-year term prosecutors had originally sought.

Hathloul has 30 days to appeal her sentence, Saudi media outlets reported. Her family said she would remain on probation for three years and be subject to a travel ban for five years.

The detention of the feminists was widely interpreted as a warning from Crown Prince Mohammed bin Salman, the kingdom’s de facto ruler, that political activism was strictly forbidden. Saudi Arabia, an absolute monarchy, has grown more authoritarian under Mohammed, who has introduced some social reforms while also arresting royal rivals, prominent business executives and dissidents.

Hathloul’s plight in particular stirred international criticism of the kingdom, including by U.S. lawmakers. The verdict’s timing, with its promise of Hathloul’s release, may not have been an accident: It came a few weeks before the inauguration of President-elect Joe Biden, who has said he would reassess the U.S.-Saudi relationship, in part because of the kingdom’s alleged human rights abuses.

“Saudi Arabia’s sentencing of Loujain al-Hathloul for simply exercising her universal rights is unjust and troubling,” Jake Sullivan, Biden’s national security adviser designee, wrote Monday on Twitter.

“My sister is not a terrorist; she is an activist,” Loujain’s sister, Lina al-Hathloul, said in the family statement. “To be sentenced for her activism for the very reforms that MBS and the Saudi kingdom so proudly tout is the ultimate hypocrisy,” she added, referring to the crown prince by his initials.

Hathloul’s family said that early in her detention, she was transferred to a secret prison and subjected to torture, including beatings, sexual harassment and electric shocks. Saud al-Qahtani, a senior adviser to the crown prince, supervised the abuse, her family said. Saudi officials have denied that they torture prisoners.

Adel al-Jubeir, the kingdom’s minister of state for foreign affairs, told the BBC in November that the prosecution of Hathloul “has nothing to do with advocacy or human rights. This has to do with national security.”

During a long legal odyssey, Hathloul was first tried in a criminal court before her case was transferred last month to a special court that hears terrorism cases. A lengthy indictment against her contained a litany of accusations that shared a common theme: again and again, Hathloul had spoken out.

She spoke with filmmakers for a documentary, the indictment said. She spoke with diplomats at her father’s house about conditions in prison, from a previous arrest. She contacted “around 15-20 foreign journalists” and talked to them about the “situation of women in the kingdom.” She talked to exiled Saudi human rights activists and her fellow Saudi feminists.

One charge in the indictment accused her of “violating pledges she had previously undertaken,” an apparent reference to the vows of silence that Saudi authorities often extract from dissidents. But Hathloul, the indictment added, was not “deterred by the measures taken against her.”