A teen firebug caused £10,000 worth of damage by setting light to a washhouse, Livingston Sheriff Court heard this week.
Sam Mumford lit pieces of paper in the building at Linlithgow Bridge before fleeing with a pal.
But police who were attending an incident nearby spotted the pair running away, the court was told.
Mumford (17), and the other youth were later traced and charged.
Mumford took responsibility for starting the blaze and pleaded guilty on indictment to a charge of wilful fireraising.
Brent Bissett, prosecuting, said the flames quickly took hold of the building in Millerfield on December 28, 2013.
He said police officers immediately alerted the fire service who quickly arrived at the scene with two pumps.
It took 30 minutes to extinguish the blaze which destroyed the building, causing damage estimated at £10,000.
The roof of the former washhouse, used to store garden equipment and other items, had to be removed.
Sheriff Douglas Kinloch called for background reports and told Mumford he would be sentenced at a later date.