A Heanor pensioner urinated on a teenage school girl on a bus between Belper and Derby.
Michael Doherty also intentionally exposed himself to the victim while they were on the Trent Barton service in the Duffield area.
Police say she got on the service after school, sat down and, after a short while, realised her skirt was becoming damp.
She looked up and noticed that the 66-year-old was exposing himself sexually.
Police say the teen complained to the driver and to Trent Barton and the company handed over CCTV to investigating officers.
They then circulated Doherty’s image to the media in a bid to track him down.
From that, he was identified by a number of people and charged.
Now he has pleaded guilty to indecent exposure and also to assault in relation to urinating on the victim.
A spokesman for Derbyshire police said: “The incident took place between 4pm and 4.30pm on November 7.
“The victim, who is a teenage schoolgirl, got on the Trent Barton bus, which was travelling between Belper and Derby.
“A short time after sitting down she noticed her leg was becoming damp and she looked up to see the defendant was exposing himself to her.
“She also reported that she believes he urinated on her.”
The spokesman said the teenage girl made a complaint to the bus driver and then later to Trent Barton.
He said: “The defendant got off the bus at Derby and, as part of our investigation, we spoke to Trent Barton who handed us CCTV from the bus.
“We circulated an image to the media as part of an appeal that we took from the footage on the bus and, as a result, a number of people called us and gave us Mr Doherty’s name.
“We interviewed and later charged him with both indecent exposure and assaulting the victim when he urinated on her.”
Doherty, of Aldreds Lane, Heanor, pleaded guilty to both charges when he appeared at Southern Derbyshire Magistrates’ Court and he was handed a 12-month community order.
Magistrates also ordered him to pay £100 compensation to the girl, £85 prosecution costs and an £85 victim surcharge.