A NAKED man was spotted performing a sex act in his bathroom window by parents collecting their children from a primary school, a court heard.

Shaun Hambleton is now facing up to six months in jail after he was seen standing on the windowsill, pressed against the frosted glass at a house in Entwistle Street, Tonge Moor, looking at two young schoolgirls while exposing himself.

The 26-year-old was due to go on trial at Bolton Magistrates Court yesterday after initially denying indecently exposing himself, but on the day of the hearing he changed his plea to guilty.

Glenn Anderton, prosecuting, told magistrates how parents had been standing at the gates of Moorgate Primary School, waiting to collect their children at between 3.15 and 3.30pm on July 18 last year, when they spotted a figure pressed against the frosted bathroom glass of a house opposite.

A naked man was looking out of the open top part of the window and he could be clearly seen performing a sex act upon himself while looking towards two girls, aged 10 or 11, who were near the house.

"He doesn't appear to have seen, or been in any way looking towards the parents," said Mr Anderton.

He added that when one of the shocked parents shouted up at the window, Hambleton appeared to jump off the ledge and away from the glass.

"One of the parents went and banged on the door because they were so incensed by the defendant's behaviour," said Mr Anderton, but they could get no reply.

The school's headteacher and police were informed and 26-year-old Hambleton was arrested.

In a police interview Hambleton, now of Bishopbridge Close, Great Lever, claimed he had been naked because he was about to take a shower and had sat on the window ledge with his back to the glass while he mended his razor.

But he admitted his guilt yesterday morning, as his trial was about to start.

James Towey, defending, stressed that no children are believed to have witnessed Hambleton's behaviour.

"His actions were unthinkable, unspeakable, and he cannot explain why he did it," said Mr Towey.

He added that Hambleton, who has no previous criminal record, apologised for his behaviour.

Magistrates adjourned the case until February 12 to allow pre-sentence reports to be prepared.

In the meantime he was granted bail on condition that he does not go to Entwistle Street or have any unsupervised contact with children.

The school's headteacher declined to comment.