Four fire engines and 21 firefighters and officers were called to a fire at a railway depot in Orient Way, Leyton.
A small part of a transformer unit in the engine car of an 18 carriage train was damaged by the fire.
Around 35 people evacuated the maintenance building before the Brigade arrived. There were no reports of any injuries.
The Brigade was called at 1507 and the fire was under control at 1650. Fire crews from Leytonstone, Homerton and Stoke Newington fire stations attended the scene.
The fire has been recorded as accidental and it is believed to have been caused by an electrical fault.