A single fingerprint on a box framed a man as being involved in a burglary at a flat.
Adam Hindley and another man had entered a ground floor flat on Charnley Road, Blackpool, but left empty handed.
But Preston Crown Court heard the 76-year-old victim returned to discover his home had been ransacked.
Hindley, 23, of Alexandra Road, Blackpool, had been committed by magistrates for sentencing at the crown court on a charge of burglary with intent to steal.
He admitted the offence, which dated back to October 27 last year.
Another man involved has already been given 32 weeks detention for his part, though he had six offences taken into consideration too.
Roger Baldwin, prosecuting, said the occupant had left his flat secure.
He returned to find that his front door had been forced, causing extensive damage to the internal door frame.
He described his home as having been ransacked, but nothing appeared to have been stolen.
Police carried out a crime scene investigation and a fingerprint was found on a mobile phone box inside a bedroom.
That print belonged to Hindley.
He admitted the offence when interviewed in April.
Peter Horgan, defending, said Hindley lived in a hostel.
He had a relative who lived in the same block of flats as the one that was burgled.
He said: “He says that someone else did the burglary and he followed in.
“He would have taken something if he had found it, but nothing was found.
“He recognises that a custodial sentence is inevitable”.
Judge Michael Byrne sentenced him to 30 weeks’ jail and ordered the defendant to pay a £100 statutory surcharge.