A teacher had sex with a 16-year-old pupil in an aeroplane toilet after the pair drank alcohol on the flight back from a school trip, a court has heard.
Eleanor Wilson, 29, of The Rope Walk in Dursley, Gloucestershire, later told the boy she was pregnant, a jury heard.
Miss Wilson told the boy he would be a father during a “clandestine” affair they had after the trip in 2015, the prosecution told Bristol Crown Court.
She denies sexual activity with a child under 18 while in a position of trust.
The pupil and the school concerned cannot be identified for legal reasons.
An allegation of the affair only came to light after another male pupil at the school became aware of the relationship and threatened to expose Miss Wilson unless she had sex with him, prosecutor Virginia Cornwall told the court.
She said Miss Wilson, known as Ellie, was a “bright and capable” science teacher who was “highly regarded”.
A “bond” developed between her and the boy on the trip, which took place when she was 26, after “an erosion of boundaries”, Mrs Cornwall said.
On the flight home, the pair were seen by another pupil “sitting inappropriately” after they had been drinking, the jury heard.
Mrs Cornwall said the alcohol led to “a lack of inhibition” and the pair went to the plane toilet together where they had sex.
“It was a secret between them,” she said.
After the trip they exchanged telephone numbers and met several times.
She later told the boy she was pregnant by him and decided to have an abortion and kept it from her boyfriend.
Mrs Cornwall said: “There is no doubt there was a pregnancy but she does not accept that she had intercourse with the boy or that he was the father.”
She later informed the school which conducted an investigation and she resigned from her job, the jury heard.
Miss Wilson faces four counts of sexual activity with a child under 18 while in a position of trust.
The case continues.