An Irvine teacher has been found not guilty of stalking a teenage pupil – despite admitting to repeatedly texting her and delivering a birthday card to her house.

Ross Davidson, 47, walked free from court last week after a Sheriff said she could not convict him of causing fear and alarm – even though he admitted he was texting the teenage girl every few days.

Kilmarnock Sheriff Court heard evidence from two former pupils, one of whom said Davidson – a married guidance and maths teacher – kept a list of girls names in his pocket of who he wanted to dance with at the Christmas party.

The witness, who cannot be named for legal reasons said: “He would come over at lunch times and get my cutlery for me and he would always have pupils in his office, mostly female pupils.

“At Christmas he would have a list in his pocket of pupils names. Girls who he wanted to dance with. He told me about it (the list) because I was on it. (I was) very concerned that he had this list in the first place and I was not too happy to be on it.”

The 21-year-old woman told the court Davidson had a special nickname for her then 17-year-old friend – who he was accused of stalking – and even told her he loved her.

She said: “He would refer to her as his “insomniac friend” because they were both up late (when texting). I know that he told her that he loved her after we left school.

“For me the comments he made were completely over the line and I felt she should just shut down communications but she felt obliged.”

The court also heard from the former pupil Davidson was accused of stalking, who testified that he would text her every couple of days and it made her feel “uncomfortable”.

She said: “To begin with it was just general chit chat. After I left school I felt the text messages were more inappropriate and that’s when I began to not reply. They made me feel uncomfortable.

“There was one evening when he was in the local pub and he asked me to go. I didn’t go and he said it was ‘a good job that I did not go or we would have done something that we enjoyed or regretted.’ I felt it was something I did not want to do. I was a wee bit intimidated by it.”

Davidson, of Carrick Drive in Irvine, denied sending that text message but did admit that he had been texting the pupil that evening and in the days that followed he went to her home address to hand deliver a birthday card and gift of tickets to the 2014 Commonwealth Games.

The former pupil, now 22, said she went to her friend’s house to hide from Davidson. The court heard Davidson also went to the friend’s house to hand over the tickets and the two girls hid in a bedroom until he left.

The witness said: “We were hiding in the bedroom and did not go near the front door. We stayed there for a few minutes then went to the living room and could see him leave.”

The woman said the texts from Davidson finally stopped when her boyfriend texted him telling him to stop or he would “take it further”.

Davidson admitted after the girl’s boyfriend texted him: “I was desperate to text her to find out what the problem was but I didn’t in case her boyfriend had her phone.”

Davidson testified that the second pupil, who was 16 at the time, had given him both addresses so he could deliver the “spare” tickets. His lawyer, Simon Brown, produced credit card statements which showed Davidson spent £780 on tickets for the games that summer.

Despite the head teacher of the North Ayrshire school where Davidson worked testifying his conduct was “wholly inappropriate”, Davidson said he saw nothing wrong with what he had done. He said: “I disagree with his opinion. I don’t see the problem with texting a former pupil with things that are not inappropriate.”

Sheriff Shirley Foran told Davidson his behaviour was “concerning” but she did not think it had been proven he caused the young girl fear and alarm.

She said: “This has been a very difficult and concerning matter. I want to make it clear from the out set that I, by and large, accepted the evidence from the two young women. I accept that there was a certain cause for concern. However the test in law goes that the course of conduct must have been one that causes the victim fear and alarm. While I’m of the view Mr Davidson behaved inappropriately and unwisely, I’m not satisfied that the third and final leg of the law is met. It skirts very closely on to the boundaries of criminality.”

Davidson was found not guilty, and has lost his job with NAC.