A science teacher had sex with a teenage pupil in the toilet of a plane as they returned from a school trip, a court has heard.

Eleanor Wilson, 29, is accused of touching the boy as she sat next to him on the flight before beckoning him into the toilet and performing a sex act on him. They then had full sex in the cubicle, it is claimed.

Bristol crown court heard that Wilson later told the boy she was pregnant and he was the father, but that she would have an abortion.

The defendant and the boy, who had both been drinking during the flight, were on a school trip during the summer holidays of 2015.

Virginia Cornwall, prosecuting, described Wilson as a bright and capable teacher but a risk taker. She said that during the overseas trip Wilson and the boy, who cannot be identified, spent a lot of time together.

“It was the circumstances in which the two interacted on that trip that led to an erosion of boundaries and it was her responsibility, the crown says, as the adult, to ensure there was no erosion of boundaries,” she said.

“She was a 26-year-old woman and he was a teenage boy. It was her choice to be with him. There were a lot of nighttime chats where others had gone off to bed. He was being treated on a par, an equal basis, as if an adult.”

Cornwall said Wilson and the boy had been drinking on the flight home. “It was the alcohol, you might find on the evidence, contributed to the lack of inhibition on the part of the defendant,” the prosecutor said.

“Such intimacies and attraction built up during the days and nights of the trip, which resulted in close contact on the plane.”

Wilson beckoned him into the toilet, where they had sex, Cornwall said. “Having had sex they went back to their seats. It was a secret between them.”

After returning home, their “clandestine” relationship continued, with Wilson and the teenager going for a meal at Nando’s with others from the trip, the jury was told.

They also allegedly had days out together at Tintern Abbey in Monmouthshire and Ashton Court near Bristol, went for pub meals and drank pints of cider together.

The court heard that the boy bought Wilson flowers and chocolates and showed her his bedroom, where they kissed.

The teenager told friends about the relationship and when they returned to school for the start of the new academic year, rumours circulated.

Wilson was spoken to by the school’s head and deputy, but “appeared shocked” and denied having an inappropriate relationship, Cornwall said. The court heard another boy at the school threatened to reveal what had happened unless she had sex with him. Wilson resigned after a school investigation.

Wilson, of Dursley, Gloucestershire, denies four charges of sexual activity with a child by a person in a position of trust, claiming the boy’s version of events was a “distorted fantasy”.

The trial continues.