A teacher accused of having sex with a 16-year-old pupil in a plane toilet described the allegation as sounding like the script of a “weird porn film” and claimed the complainant had imagined the episode.

Eleanor Wilson accepted that she gave the teenager her phone number and they were in contact almost daily over the summer following the alleged incident but she said she was horrified at the claims about her behaviour.

In the witness box at Bristol crown court Wilson, 29, told the jury she had a degree in experimental physics and is now working as a civil servant having left the teaching profession.

She described the boy as “quite a charming, cheeky chap” and said she had put her arm around him to comfort him while they were on the overseas trip when he was upset, telling him: “Girls don’t go for crying boys.”

Wilson said when they took the night flight she had a small bottle of red wine with her in-flight meal and a can of gin and tonic and some pupils told her they had been drinking.

Wilson said she became aware that a pupil – not the complainant - had spent a lot of time in a toilet. She went to check and perched outside the toilet, where she was joined by the alleged victim. She insisted they did not touch. Asked about the allegation of having sex in the toilet she said: “There is no truth whatsoever.”

Back in the UK, Wilson said the boy gave her chocolates and flowers on a lunchtime visit to Nando’s. She gave the complainant a lift home, knowing it was against school policy, but she said she did not want to leave him stranded.

Wilson said the boy told her: “I don’t know how I’m going to cope not being able to talk to you over summer.”

The teacher said there was no kissing or touching but she gave the teenager her telephone number and said they were in telephone contact “almost daily” over the summer.

When Wilson was confronted about her alleged relationship with the boy, she said: “I was horrified someone could say that.”

The court also heard Wilson’s response to the claims during police interviews. Of the toilet allegation, she said: “The amount of detail has come from his imagination and I don’t know why he was saying that.

“They are very good at imagining stuff and thinking of … it seems like some weird porn film. I think it is something that is scripted. It is not a memory.”

She added: “I would not jeopardise my career or risk going to prison. I would not have broken the law or gone beyond the friendship.”

Wilson said she formed a friendship with the boy because she had no other friends, and apart from her then boyfriend, Andrew Hall, there was no one else she could talk to.

During the seven months after the school trip there were 339 contacts on the boy’s mobile phone, including 295 text messages and 23 calls.

Wilson said they went to Tintern Abbey in Monmouthshire during the summer holidays because she wanted a day out.

“He was really the only person I had that was a friend. He was the only person I would talk to apart from Andy,” Wilson told police. “I was lonely and I wanted to spend a day out with someone. He was my only friend.”

Wilson denied holding hands or kissing the teenager in his bedroom after dropping him home following the Nando’s trip or during the days out at Tintern Abbey and to the Ashton Court estate near Bristol.

Wilson told police she confided in the boy that she was pregnant during a conversation in her office at the school, and would be having an abortion. “I didn’t want to tell Andy about it and [the boy] was the only person I spoke to,” she said.

“He seemed to just care. He was kind of worried and asked whether I wanted him to come with me and I said no because I knew that wouldn’t be right.

“I saw [the boy] as a mate rather than a pupil. It had become casual and totally blurred because I didn’t teach him any more.

“I am quite naive and I do believe the best in people. I thought [the boy] was a caring person who needed help and a bit of guidance and needed a friend.”

Wilson, of Dursley, Gloucestershire, denies four charges of sexual activity with a child by a person in a position of trust.

The trial continues.