Fire crews were called to a block of flats in Exeter on Wednesday afternoon when an electrical box caught alight.
Crews from Danes Castle and Middlemoor fire stations tackled the fire at an address in St James Terrace shortly before 2.30pm.
Devon and Somerset Fire and Rescue Service (DSFRS) said the cause of the fire was accidental.
A DSFRS spokesperson said: “Fire control received a call reporting an electrical box on fire within a block of domestic flats.
“Fire engines from Danes Castle and Middlemoor were quickly mobilised and soon arrived on scene.
“Fire crews got to work using two breathing apparatus, one hose reel jet, one safety jet, one dry powder extinguisher, positive pressure ventilator fan, small tools and a gas monitor.
“With this equipment the fire crews successfully extinguished the fire.
“The cause of the fire was accidental.”