A MODERN Studies teacher who had intercourse with a female pupil has escaped a jail sentence.

Ryan McInally, 30, admitted having sex with the 16-year-old girl at his home while his partner worked nightshift.

But he was caught out after rumours of their relationship swept Earlston High and the police were contacted by the school.

The girl admitted to officers they had a sexual relationship and had full intercourse.

At Selkirk Sheriff Court, McInally was ordered to carry out 200 hours unpaid work and had his name put on the Sex Offender’s Register for three years.

He was supported in court by his partner who is the mother of his two children.

Defence lawyer Robert More said: “His partner deserves enormous credit for the way she has stuck with him in difficult circumstances.

“The offence was admitted to her shortly after he was arrested.

“They have rebuilt their relationship.”

He added: “He is a man of high intelligence but was extremely foolish on this particular occasion.”

McInally pleaded guilty on indictment to a charge of while in a position of trust as a teacher having sexual intercourse with the girl pupil at a house in St Boswells on an occasion between December 22, 2013 and January 16, 2014.

Procurator fiscal Graham Fraser told the court that the girl had difficulties with Higher Modern Studies and he had assisted her during a free period.

He said they had got on well and as well as speaking in school communicated on Twitter.

Mr Fraser said that just before the Christmas holidays he gave her a Christmas card which contained his e-mail address in case she needed help and two quotations from The Great Gatsby which was one of her favourite books - one of which had “connotations”.

He explained: “She contacted him by the email provided. He suggested that they should meet and she was happy to go along with this.

“On Sunday, December 22 they drove into the countryside near Galashiels and stopped at a viewpoint wooded area where they kissed on this occasion.

“They were joking how awkward it was going to be.”

Mr Fraser said they continued to meet up during the holidays and on New Year’s Eve he took her back to his home where she stayed overnight.

He said: “This became clear from the e-mail exchange clear from the e-mail exchange in the ensuing hours where she said he talked in his sleep. There was no indication sex had taken place.

“This repeated itself when the partner was out with had shift work and she came round to the accused house and spent time with him.”

Mr Fraser said this appeared to have been known to other pupils at Earlston High School and rumours started to circulate especially when she was spotted being driven home in his car.

McInally was spoken to by senior school staff and said he had run her home as she was not feeling well and was in distress and any other teacher would have done the same.

But the school contacted the police and the girl admitted she had had a sexual relationship with the accused which involved full intercourse and this was supported by a medical examination.

McInally of Monikie in Angus moved to the Borders with his fiancee in Autumn 2013 to take up the post at Earlston High School.

Mr More said he was suspended from the school when the inquiry was launched in January 2014 and he had since returned to the Dundee area with his fiancee.

She had their second child 10 months ago.