Thousands of homes were left without power following a fire at an electricity sub-station.
The plume of smoke could be seen for miles
About 25,000 addresses in Redditch, Worcestershire, were reported to be without electricity after an explosion at the site in Mason Road.
A Central Networks spokeswoman said power was restored to all those affected by 0040 GMT on Sunday.
She said it was not clear what had caused the fire, which is now out, and an investigation would be carried out.
West Midlands Ambulance Service said they were alerted at just after 1500 GMT on Saturday and the fire was put out at about 2200 GMT.
Homes in Mason Road were evacuated as the street was filling with thick black smoke with 80 residents and 17 people in a sheltered housing scheme being affected.
Crews had to wait for staff from Central Networks to make sure the power was off before the fire could be tackled.
The fire left thousands without power
About 17,500 litres of mineral oil were leaking from the site into back gardens and this was allowed to burn off naturally to minimise damage to the environment.
The Central Networks spokeswoman said staff were now able to go into the sub-station to assess the damage.
No-one suffered any serious injuries or needed hospital treatment.