Morocco's monarch has pardoned a journalist convicted of allegedly having had an abortion, which is illegal in the North African country along with pre-marital sex.

A Justice Ministry statement Wednesday said the pardon for Hajar Raissouni and others convicted in the case reflects King Mohammed VI's "compassion and mercy."

Raissouni, 28, who denies having undergone an abortion, was sentenced last month to a year in prison along with the Sudanese man she calls her husband under Islamic law. The doctor allegedly involved was handed a two-year term.

Demonstrators, including prominent activists and journalists, demonstrate with a placerd reading "Free Hajar Raissouni" in front of Parliament in Rabat, Morocco, Wednesday Oct. 2, 2019. Several dozens of Moroccan activists and journalists protested for the release of jailed journalist Haja Raissouni on Wednesday, warning that the one year prison term handed to her last Monday threatens condition of women and civil rights in the country. (AP PhotoNadine Achoui-Lesage )

Demonstrators, including prominent activists and journalists, demonstrate with a placerd reading "Free Hajar Raissouni" in front of Parliament in Rabat, Morocco, Wednesday Oct. 2, 2019. Several dozens of Moroccan activists and journalists protested for the release of jailed journalist Haja Raissouni on Wednesday, warning that the one year prison term handed to her last Monday threatens condition of women and civil rights in the country. (AP PhotoNadine Achoui-Lesage )

The statement said the king's pardon derived from his wish "to preserve the future of the two fiances."

The case attracted the ire of activists and sparked debate, with many seeing it as a blow to women's rights.