Two thousand properties lost power after a fire caused damage to an electricity substation.
Hampshire Fire and Rescue Service (HFRS) said the fire broke out on West End Road, Southampton, shortly before 10.30 BST.
A garage, unused cattery, two sheds and summerhouse were all ablaze, before it spread to the neighbouring substation.
Scottish and Southern Electricity Networks (SSEN) said power had been quickly restored to most households.
HFRS said the fire was extinguished shortly after midday. No-one was hurt.
SSEN said 130 properties closest to the fire had remained offline, but their power was restored early in the afternoon.
"We would like to thank our customers for their patience and apologise for any inconvenience caused as our engineers worked to safely restore power supplies as quickly as possible," a statement said.
The cause of the fire is being investigated.