A woman in Northern Ireland was handed a suspended prison sentence after taking pills bought on the internet to induce a miscarriage in July 2014, Belfast crown court heard on Monday.

The 21-year-old woman — who cannot be named and was 19 at the time of her arrest — pleaded guilty to two charges of inducing a miscarriage. She said she could not raise enough money to travel to England for a termination, a common practice for women in Northern Ireland who have no safe or legal access to abortion. She instead contacted a clinic in England that advised her on which drugs to order.

The judge sentenced her to a three-month jail term, suspended for two years on the assumption she does not break the law again, after her defence barrister Paul Bacon told the court she had been "victimised by the system" and that if she had lived in England, Scotland, or Wales, where abortion is legal, she wouldn't "have found herself before the courts".

The barrister described the woman as a teenager "who felt trapped" and who resorted to "desperate measures". He told the court that she is now living with a partner and has a new baby.

Before his ruling, the judge told the court the legislation under which she was prosecuted was 150 years old and had been amended across the UK, except for Northern Ireland.

Police were initially contacted by the woman's two housemates, who said she had told them she was pregnant. The housemates say they found the male foetus in a bin in their shared house in south Belfast. A postmortem confirmed that the foetus was the woman's.