A teacher who made a string of inappropriate comments to girls in his class has been allowed back on the teaching register.

Peter Herbert, a computing teacher at Ullapool High School in the Highlands, asked one S5 pupil if it was her "time of the month" and befriended pupils on Facebook so he could send inappropriate messages to them.

He also tried to open a zip on the shirt of a pupil and place a two-pence coin into the zip.

His case was referred to the General Teaching Council for Scotland for a decision on his fitness to teach but the panel ruled that despite upholding the majority of complaints against him, he should still be allowed to teach.

A written decision on the case states: "It was the Panel’s assessment of Mr Herbert’s actions regarding the use of Facebook and his inappropriate comments and touching that they were ill-considered but were not sinister.

"The Panel also had regard to the pupil evidence, which was that Mr Herbert was well liked as a teacher and that his classes were informal.

"In all the circumstances, the Panel was satisfied that Mr Herbert’s conduct as set out in its findings was capable of remediation and had been remedied.

"The Panel was satisfied that this had been a salutary lesson for Mr Herbert and his misconduct was unlikely to be repeated in the future.

"The Panel found that his fitness to teach is not currently impaired."

Mr Herbert faced a total of seven charges. He admitted five of them relating to Facebook and taking a pupil's mobile phone, but denied the others.

The Panel found a charge that he asked a girl if it was her time of the month because she was wearing red tights proved.

They also upheld another charge involving him unzipping a zip on a pupil's shirt after commenting that it was a "strange top".

The pupils replied "it doesn't open, it's not a pocket" and claimed Mr Herbert said "let me see" before opening and closing the zip and trying to put the coin in it, which fell to the ground.

The teacher faced disciplinary proceedings in 2013, before returning to work in January 2014 with certain conditions attached.

He was not allowed to communicate with pupils without the approval of the head teacher for nine months and also had classroom observations and counselling.

He has since left the school and now teachers at Invergordon Academy.