A fire broke out in a fish and chip shop in Sowerby Bridge last night (Tuesday).
Crews from Halifax and Illingworth were called to Marina, Bolton Brow, at around 7.50pm.
A fire broke out in the fuse box and the owner was alerted to the blaze when all the lights went out.
He evacuated the customers and the called the fire service.
A West Yorkshire Fire and Rescue spokesperson said the fire had taken hold of the fuse box and was just going up the wall.
He added: “Three or four minutes later, it would have taken hold and been much more serious.
“It had gone from a small fire to a developed fire, so it’s lucky we got the call when we did.”
Fire crews used a dry powder extinguisher on the fire and had a hose reel on standby if the fire redeveloped.
The scene was cleared by around 8.15pm.