A court heard how Charles Greaves hid a tiny digital video camera inside a bottle of shower gel. The 19-year-old then left the bottle in the bathroom of his mixed-sex halls of residence at Bangor University.

Greaves, of Wellington, Shropshire, pleaded guilty last month at Caernarfon Magistrates' Court to three counts of voyeurism and three counts of installing equipment for the purpose of voyeurism.

Yesterday at Caernarfon Crown Court he was sentenced to nine months in a young offenders' institute for each count to run concurrently.

But Judge Merfyn Hughes suspended the sentence for two years.

Greaves, previously described as an "overweight loner", will also be super-vised for 12 months and must register as a sex offender for 10 years.

The former history student, who now works as a chef, breathed a sigh of relief in the dock as the sentence was suspended while his parents burst into tears.

Judge Hughes told him: "The serious aspect of your behaviour is that it involves a breach of trust which students of mixed gender place in each other when sharing accommodation of this kind.

"The psychological impact on the victims, the shock and the distress, will be significant. I don't believe that you fully under-stand that.

"Not only you have harmed these three girls who you filmed but you have damaged your own academic prospects and brought great shame on your family.

"I agree there's a degree of naivety and immaturity in your character."

Robert Trevor Jones, prosecuting, said the offences happened between May 1-22 this year. Greaves, a first year history student, was living at the Neuadd Emrys Evans with 18 other students.

Mr Jones said: "The defendant was described by other students as somewhat of a loner.

"He was prone to wandering around a lot at all times of night and was seen sitting outside students' rooms reading a book."

The hearing was told how a woman saw Greaves "loitering" around the bathroom when she went to fetch a towel while running a bath.

Mr Jones described how Greaves "after giving some thought to what he was doing" put a digital camera in a specially adapted shower gel bottle and hid it in a soap holder near the shower.

The camera recorded moving images but the quality was poor and "unsatisfactory".

Mr Jones said: "He then put the camera on the edge of the bath to film people taking a bath.

"He produced a typed notice in which he apologised that the shower was malfunctioning in some way and that it would be repaired by maintenance."

Greaves recorded images of three women showering and bathing before one of the students found the camera.

Police officers seized Greaves' lap-top and he was arrested.

He admitted doing it for "sexual gratification" describing the last few weeks as "a dream".

Mr Jones said the women were "afraid, shocked and had been scared".

They were taking their exams at the time. Andrew Green, defending, said Greaves apologised for violating and disrupting the students' lives.