A hapless Perth man sparked a massive police manhunt after pretending he had been robbed because he was strapped for cash.
David Donaldson flagged down officers and told them he had been set upon by two men in Jeanfield Cemetery.
He hoped the fictional theft would allow him to claim further cash from the benefits agency.
Depute fiscal Bill Kermode told Perth Sheriff Court that Donaldson approached the officers at around 6.30pm and they initiated a full scale investigation involving detectives and a sniffer dog.
He said: “There was no dog available in Tayside and, given the serious nature(of the allegation) it was arranged for a dog to be brought from the Fife area.
“The accused stated he had been walking in the cemetery when he saw two males near a grave.
“He said that when he passed them he heard footsteps and looked round and was struck on the head.”
Davidson gave detailed descriptions of the men he claimed were responsible but his lies quickly unravelled when he began describing the items taken from him which he said included a mobile phone and £83 in cash.
Mr Kermode said: “Constable Lamb started further questioning the accused as to what was in his rucksack and what type of phone it was.
“The accused said it was an iPhone. Constable Lamb asked for the number of the iPhone, explaining that they have GPS tracking. He witnessed the accused’s body language change immediately.
“The accused began to change his story, saying his iPhone was not in his rucksack and was at home.
“Constable Lamb was now suspicious the accused refuted that he was lying and initially stuck to his story.”
When detectives arrived on the scene, however, Donaldson broke down and admitted he had invented the robbery because he was “in a financial mess”.
Donaldson’s solicitor said he understood the seriousness of what he had done and recognised that “diverting police resources would have an effect in other incidents”.
He added: “He foolishly thought, by making up this complaint, he would be able to go back to the benefits office.”
The solicitor said that, since being held on remand at Perth Prison, Donaldson had been able to see a psychiatrist and was working to address issues stemming from his youth.
Donaldson had previously admitted wasting police time on May 22 2013.
Sheriff William Wood told him: “It should have been apparent to you that time and resources would have been allocated to investigate.”
He sentenced the 41-year-old, of Jeanfield Road, Perth, to carry out 170 hours of unpaid work.