A six-month pregnant teenager bought pills to illegally abort her baby, a court heard.

Sophie Harvey is accused of taking the drug to end her pregnancy after learning she was at 28 weeks and five days gestation – meaning she could not get a legal abortion in England.

Prosecutors allege Harvey and her boyfriend, Elliot Benham, of Wingfield Swindon, now aged 25, then searched online for methods to end the pregnancy and bought drugs, which she then took.

Gloucester Crown Court heard that after giving birth in the bathroom of her home aged 19, Harvey wrapped the baby in a towel and disposed of it in a bin.

Anna Vigars KC, prosecuting, told the court abortions are legal in England up to 24 weeks gestation if carried out by a registered medical practitioner, and can be carried out beyond 24 weeks in very limited circumstances, which did not apply in this case.

“These two young people found themselves in a very difficult situation facing difficult choices – a situation of their own making,” she said.

Mrs Vigars explained that by August 2018, Harvey thought she might be pregnant having not had a period since mid-April.

Harvey and Benham told the GP she might be about 16 weeks pregnant and did not want to keep the child, so they were referred to the British Pregnancy Advisory Service (BPAS).

The couple had an appointment at BPAS on August 30 where a scan revealed Harvey was at 28 weeks and five days gestation.

“Staff spent time speaking with them and unsurprisingly both of them appeared shocked," Mrs Vigars said.

“She didn’t want to have the baby and bluntly both of them wanted the problem to disappear,” the prosecutor said.

The court heard the defendants had searched the internet for information on illegal abortions and the drugs needed.

Addressing the jury, Mrs Vigars said: “Whatever your views of abortion and the right of woman to choose, or whether you believe abortion is wrong because of the ending of a life, what is very clear is this: by the beginning of September 2018, Sophie Harvey and Elliot Benham were in a difficult position and one that was not going to go away unless they did something about it.”

Mrs Vigars said about a week after the BPAS appointment, Benham paid £309.44 for drugs to induce a medical abortion, which he collected from the Royal Mail on September 22.

Harvey later told the police they had decided to keep the baby but in September suffered a stillbirth.

“Their position is this,” Mrs Vigars said. “In fact, they suffered a stillbirth between the date the pills were ordered and the date they arrived.

“They say Sophie Harvey gave birth in a bathroom one Sunday afternoon while her family were away at a dancing competition.

“In her shocked state, she wrapped the baby in a towel and disposed of the baby.

“They say that although they had got what they needed for an illegal abortion, in fact, Sophie Harvey never took the pills and the baby was born still, and the pregnancy came to an end naturally.”

Mrs Vigars added: “The prosecution does not accept that account. The prosecution's position is that the pregnancy was brought to an end by the taking of that pill."

Harvey, of St Mary’s Road, Cirencester, Gloucestershire denies charges of procuring a poison, procuring own miscarriage by poison and attempting to pervert the course of public justice.

Benham, of Wingfield, Swindon, Wiltshire denies a single charge of attempting to pervert the course of public justice.

The trial was adjourned early for lunch after Harvey became tearful in the dock.