Police caught a naked runner who disturbed dozens of female joggers after finding a till receipt and an empty packet of Haribo sweets he had dropped near the scene.
Officers were determined to catch the pervert who had been hiding out on a stretch of riverside paths by the Wear near Durham city and preying on lone women over a period of weeks.
Dressed only in running shoes, he would run alongside his victims after spying on them from bushes.
Police believe there may have been many more incidents which went unreported.
Officers carried out a series of operations, including plain clothes patrols in which female officers posed as joggers to lure the suspect.
The breakthrough came when one of the officers found an area on the parapet of a disused railway bridge which the culprit used to spot his victims coming.
An empty Haribo packet and shop receipt found nearby allowed officers to pinpoint the moment that the sweets were bought and scour CCTV for an image of the suspect.
An 18-year-old man has now admitted several offences and has been admitted to Checkpoint, a four-month intervention programme to deal with his behaviour.
Checkpoint is an out-of-court system unique to Durham to deal with repeat offenders. If offenders admit their guilt, instead of receiving a criminal conviction, they can go through the programme to address underlying problems which cause them to offend.
Sergeant Kay Howarth, of Durham City Police, said: “This was quite an unusual case because the riverside in Durham is usually such a safe place and is visited by families all the time, which made us all the more determined to catch him.
“It must have been very alarming for these women to have a stranger jump out at them while they were simply out enjoying a run.
“We would like to thank all those who rang in to report this man and for all those local runners who helped with our investigation.
“Our officers were determined to find this man and we will continue to work to make sure Durham is a safe place for everyone.”