A teacher at Prince Charles’s old school was a cunning predator who put his own lust above his pupils' welfare, a sheriff said.

Jailing Andrew Keir for just a year – the maximum term available to her court – Sheriff Olga Pasportnikov said the sentence was “woefully inadequate”.

Keir, 67, was found guilty after a three-day trial in March of a string of lewd and indecent offences involving 13-year-old boys in his care almost three decades ago.

The sheriff described it as “a grooming situation” which followed a ­“predatory, premeditated and manipulative” course of conduct.

Physics teacher Keir was an assistant housemaster at Gordonstoun boarding school in Moray.

The school’s former pupils include rower Heather Stanning, David Bowie’s son Duncan Jones and royals including Prince Philip and Prince Charles.

Keir, now living in Calveley near Tarporley, had denied swimming and showering in the nude while aroused with three pupils.

His victims, now in their 40s, told how he took them for secret swimming sessions in the school’s pool after dark and chased them naked in the water.

Judo black belt Keir was also convicted of putting his hand on one victim’s crotch and bottom while they “grappled” in a classroom.

He then put his hands down the same pupil’s ­trousers while he played computer games and performed a sex act on him.

Keir was convicted of lewd, indecent or ­libidinous practices between 1988 and 1989, indecent assault and ­disorderly conduct.

Sheriff Pasportnikov said he’d shown no remorse or contrition but she was limited to a one-year jail sentence because Keir had appeared on a summary charge, not an ­indictment.

She told Keir: “It is woefully inadequate and in no way reflects the gravity of your offending.”

Gordonstoun later praised the whistleblowers and said rigorous measures were now in place.

The school said: “The offences are distressing for all involved and we admire the courage of those who came forward to seek justice.”

A spokesman for NSPCC Scotland said: “This is a disturbing case. As a schoolteacher Keir had a duty to protect children but instead he abused it appallingly to carry out lewd acts involving children.

“Abuse ruins childhoods and its effects can last long into adult life so it’s right that he is now behind bars where he cannot harm others.

“We hope Keir’s victims now receive all available support. It is vital that victims of abuse feel confident to speak out about their attackers, no matter how much time has passed, and receive justice for the crimes carried out against them.”