A teacher who took a 'besotted' 15-year-old schoolgirl to the seaside stopped in a lay-by where she performed a sex act on him, a jury has been told.

Gavin Gray was a new IT and PE teacher at Headlands School when he caught the eye of the girl in late 2000, Swindon Crown Court heard

After exchanging a series of emails she said he took her on trips out in his car where he carried out a series of sex acts on her.

And she said she then went round to his flat above a funeral parlour where he was going to take her virginity only for him to back out at the last minute.

Gray, 45, who moved away to the Isle of Wight soon after and now lives in Yeovil, denies having any kind of sexual activity with the pupil, now a woman in her mid 30s.

Robert Bryan, prosecuting, said the schoolgirl thought she noticed her new teacher was looking at her in her IT classes and was 'quite flattered'.

Not only did she notice, he told the jury of seven women and five men, but friends in the same class also saw the way he looked at her.

He said the pair then started messaging each other on the school computer system before exchanging private email addresses so they could contact each other at home.

"As an IT teacher he gave her tips on how to message privately so her mother would not find out," Mr Bryan said.

He told the jury that the messages were 'very flirty' and 'sexual' with him telling her what he wanted to do with her.

"She couldn't remember who suggested they first meet. She thought they had been messaging a few weeks before they met," he said.

The pupil said Gray picked her up from lay-by, opposite the Penhill park and ride, in a baby blue Peugeot 406, after she told her mum she was going out with a friend.

She said her teacher, who had a girlfriend at the time, told her to keep her head down in Swindon so they wouldn't be spotted together as they drove to the seaside.

Once there they pulled up in a lay by and after kissing he touched her over her clothing and then performed an indecent act, the court was told.

She told the police they met a second time in the same way, where similar touching took place, before she went to his house for sex.

After stripping her and them touching each other he changed his mind, she said, and they got dressed and soon after the relationship 'fizzled out'.

When he was questioned Gray, who is now married with two children, said that he was friendly with the girl but did not have any sexual contact with her.

He said she had got hold of his email address and he took her to Weston-super-Mare where he went kite surfing and met her on another couple of occasions,

Gray denies 12 counts of indecent assault between December 2000, and April 2001, and the trial continues.