A dad claimed he torched a Larkhall carwash out of revenge after he was the victim of a hammer attack.
However, Andrew Johnston's bid to destroy the premises failed when a water pipe burst and put out the fire.
Johnston, 40, of Pollok, Glasgow, was jailed for a year at Hamilton Sheriff Court when he admitted setting fire to The Wash Centre in Strutherhill Industrial Estate.
Johnston poured petrol on to the door and metal shutter in the early hours of September 11, 2020.
The fire burned for just 10 minutes before fizzling out, leaving only scorch marks.
Abby Seal, prosecuting, told the court: "Police carried out extensive inquiries and viewed CCTV of the location and surrounding area.
"They were able to identify a car that had dropped off the accused. The vehicle was linked to him and he was arrested two weeks after the fire.
"Damage was minimal as the heat had burst a pipe and water extinguished the fire."
Defence agent Calum Weir said Johnston, who lives with his partner and two children, had been attacked and badly injured by two men armed with a hammer not long before this incident.
The lawyer stated: "One of those attackers was a man who was involved with the carwash. This was an ill-conceived attempt at revenge.
"There were potentially catastrophic consequences but the damage, fortunately, was very much limited."
Jailing Johnston, Sheriff Martin Jones told him: "There was a degree of planning involved. Anyone who is armed with an accelerant and sets fire to premises will be treated extremely seriously.
"It's pure chance that there was no damage. Your culpability is high."
*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!