A man who tried to torch his friend's flat was caught after using his own hooded top to start the blaze.
Forensic tests on a charred piece of clothing proved the top belonged to James Brownlie.
Brownlie, 33, admitted setting fire to the flat in Dalziel Tower, Motherwell, on April 13 while on bail.
Hamilton Sheriff Court heard that firefighters arrived to find the front door of the fifth floor flat well ablaze.
They managed to douse the flames and prevent the fire spreading.
Abby Seal, prosecuting, said: "They forced entry and found the flat was empty.
"Rags behind the door were still smouldering. It appeared these had been pushed through the letterbox.
"They were from a black hooded top.
"Police officers spoke to the occupant who said he, the accused and another male had left the flat in the afternoon.
"CCTV showed Brownlie, who was wearing a black hoodie, taking the lift to the fifth floor.
"He was seen again on film 36 minutes later when he was no longer wearing the hoodie."
Brownlie's DNA was found on the remains of the hoodie.
Defence agent Diarmid Bruce said his client has drugs and mental health issues.
Mr Bruce stated: "He doesn't have much recollection of the fire but accepts he was the person responsible.
"There is no suggestion of any fallout with his pal. He's at a loss to explain what he was doing."
Sheriff Liam Murphy told Brownlie: "It's fortunate that damage was limited to the front door.
"Given the nature of the offence and your significant record, there is no alternative to a custodial sentence."
Brownlie was jailed for 18 months, reduced from 27 months because of his early plea and backdated as he has been in custody since April.
* 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!