A former assistant housemaster at a Scots boarding school used by royals and the rich and famous has been found guilty of grooming pupils.

Disgraced Andrew Keir, 67, was convicted of a string of lewd and indecent offences involving 13-year-old boys in his care almost three decades ago.

A sheriff took just 20 minutes to find the retired physics teacher at Gordonstoun, Morayshire, guilty of the charges after a three-day trial at Elgin Sheriff Court.

Immediately after the verdict the school - where Prince Philip and his sons princes Charles, Andrew and Edward were taught, and David Bowie’s son Zowie - apologised.

Disgraced Andrew Keir
Disgraced Andrew Keir

A spokeswoman said: “During the trial it became clear that the school’s response at the time of the offences was not as robust and rigorous as it would be now, and we are very sorry for this.

“Today, Gordonstoun has a rigorous approach to child protection.

“Our policies and procedures are robust and have been developed and approved by leading child protection experts.”

Keir, now living in Cheshire, had denied swimming and showering in the nude while in a state of arousal with three pupils, and encouraging them to do the same.

He refuted allegations of “skinny dipping” with pupils claiming he could have taken boys into the pool alone – but only if he had an “evil mind”.

Prince Charles in his final year at Gordonstoun School

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

Keir, a black belt in judo, 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.

The witnesses said they told the school’s chaplain what had happened but nothing was done.

Giving evidence Keir claimed his diagnosis with Asperger’s syndrome made it impossible for him to come up with a reason why the trio would accuse him.

Gordonstoun School
Gordonstoun School

Keir insisted he was often too busy as a housemaster, teacher, judo and sailing coach and driver of the school fire engine to be alone with pupils. He said: “It would have been exceptionally unusual for me to have a half hour spare. I would certainly never be alone with a pupil.”

Keir added: “If I had had an evil mind I might have managed it, but I didn’t. It would have been possible, but I didn’t.”

Prosecutor Alison Young described Keir’s pattern of alleged behaviour of getting victims alone outside of class as “basically grooming”.

Keir was convicted of lewd, indecent or libidinous practices between November 1988 and March 1989 by removing his swimming trunks in the presence of children.

Prince Philip during his schooldays at Gordonstoun

He was also found guilty of indecent assault by placing his hands down the trousers of a child and disorderly conduct by removing his swimming trunks in the presence of a child.

In their statement Gordonstoun also praised the whistleblowers and said they now had rigorous measures in place to protect children.

The school said: “We are profoundly saddened by this case.

“The offences, from 1988 and 1991, for which Andrew Keir has been convicted, are distressing for all involved and we admire the courage of those who came forward to seek justice.

“When we were contacted by the police in 2015 about the allegations we gave them our full co-operation and wrote to our alumni offering our support and urging anyone affected to contact the police.”

Sheriff Olga Pasportnikov (CORR) will sentence Keir next month (April).