A Moroccan court on Monday sentenced a journalist to a year in prison for sex outside marriage and having an abortion, both of which she denied, in a case that has outraged rights activists, who say the charges are politically motivated.

Police arrested Hajar Raissouni, 28, on Aug. 31 along with her fiance as they were leaving a gynecologist’s clinic in Rabat.

Raissouni works for Akhbar al-Youm, an independent newspaper that has been critical of the state, and is the niece of a Muslim theologian who is a former leader of a politically influential Islamist group.

The court also sentenced her fiance to a year in prison, her doctor to two years in prison with a further two-year ban on practicing medicine on charges of complicity and of performing an illegal abortion, and his assistant and a nurse at the same clinic to suspended sentences.

“We are shocked by this verdict,” said Raissouni’s lawyer, Abdelmoula El Marouri, adding that all the medical and legal evidence should have led to an acquittal.

He said Raissouni’s prosecution had been a politically motivated attack on her, her family and her newspaper, and that the verdict would be appealed.

Raissouni and her fiance told the court they had married in a religious ceremony and were preparing documents to register their marriage in law.

The doctor said she had attended the clinic to have a blood clot removed.

Raissouni said police had taken her for forcible medical checks against her will and had asked her about her work at the newspaper and about her uncles.

The Moroccan Association for Human Rights, an independent rights group, said the medical checks carried out without her consent amounted to torture.

In court, the prosecutor dismissed any suggestion of procedural irregularities, and said that the circumstances of Raissouni’s arrest had been legal and the case had nothing to do with her work as a journalist.

The prosecutor said the doctor Raissouni had visited had been under police surveillance on suspicion of carrying out illegal abortions.

Rights groups said her trial was part of a crackdown on critical reporters. Another journalist, Hamid El Mahdaoui, who covered protests in the Rif region, was sentenced last April to three years in jail for not reporting a crime against state security.

Raissouni’s uncle, Ahmed Raissouni, is a former leader of the Movement for Unity and Reform, an Islamist group close to the Justice and Development party (PJD) that leads Morocco’s governing coalition.

Another uncle, Souliman Raissouni, is editor-in-chief of Akhbar al-Youm and a vocal critic of the state. He said Raissouni had been “singled out” and accused the state of trying to settle scores with his family and his newspaper.