RABAT, Morocco — When Hajar Raissouni, an investigative journalist with one of Morocco’s only independent news outlets, went to her doctor’s office last August seeking treatment for a vaginal hemorrhage, she was not planning on becoming the center of a national discussion on press freedom, abortion rights and what critics say is the nation’s antiquated penal code.

But on Aug. 31, minutes after she received the treatment, Ms. Raissouni and her fiancé, Rifaat al-Amin, were arrested — just two weeks before their wedding date. At first, she thought they were being robbed. But she quickly realized that the six men in plainclothes holding video cameras were police officers, and that she was being arrested because of her critical reporting on the Moroccan authorities.

The couple would eventually be charged with sex outside of marriage and having an abortion, both crimes in the North African kingdom, though the abortion laws are rarely enforced. Ms. Raissouni, who strongly denies having had an abortion, says she was forced by the Moroccan authorities to undergo a pelvic examination that aggravated the hemorrhage, provoking renewed bleeding.

Her physician, Dr. Jamal Belkeziz, a second doctor and an office assistant also were arrested, charged with violating abortion laws.