A missing sex offender was found camping in a tent near Newmains after a huge search that took police officers to Blackpool.
Ryan Hill claimed he fled his home after threats were made against him and family members.
Hill, 29, of Woodside Crescent, Newmains, appeared at Hamilton Sheriff Court on Friday.
He admitted breaching a condition of the sex offenders' register by failing to tell police within three days of a change of address.
Hill was placed on the register in 2016 when he was jailed for a year after exposing himself to women in Carluke.
Police were looking for him in connection with an unrelated matter in July last year.
Jennifer McCabe, prosecuting, told the court: "He had absconded and a warrant for his arrest was issued.
"A large scale police investigation was launched.
"It was understood he had fled to Blackpool and there was considerable collaboration with Lancashire Police, but with negative results."
Police were then told Hill had returned to Scotland and had asked friends to find him a tent.
Ms McCabe added: "About 11am on September 3 he was found with a tent in a wooded area beside the A73 near Newmains.
"He freely told officers 'Since I came back I've been sleeping in a tent. I'm stinking - smell my clothes. I've been in a tent for 10 or 11 days'."
Defence agent Tom Watters said his client had failed to comply with the "formality" of informing the police that he'd changed address.
The lawyer stated: "He and his family had been subjected to intense threats and there was a fear of violence.
"He left his father's house and was looking at various addresses, but he should have notified the police of his difficulty and kept them fully advised."
Sheriff John Speir deferred sentence on Hill until next month for background reports and a risk assessment.
**Don't miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.
And did you know Lanarkshire Live is on Facebook? Head on over and give us a like and share!