The blackout hit around 15,000 properties in central and south Edinburgh, and knocked out traffic signals and street lamps during rush hour.
It was caused by a blaze at a transformer in George Square Lane at 4.30pm yesterday, where Scottish Power workers were carrying out routine work.
An investigation into what caused the fire was under way today. Around 12,000 homes were reconnected by 7.30pm, with the rest all back up shortly after 9pm.
The power cut also led to a build up of electricity at another substation at Maxwell Street in Morningside, resulting in two explosions at 8.30pm which cracked and uprooted paving slabs. Nobody was injured in the blasts.
Nick Rees, 23, a self-employed man from Polwarth, said he was walking along Morningside Road when he saw the pavement explode in front of him.
He said: “We were just about to cross the road when the first explosion went off, causing a massive hole in the pavement. A big fire ball came out of the ground. It was about three metres high.
“We were the closest to it, but luckily we were at a safe distance. It was a bit of a shock. It kept smoking for a bit afterwards.”
A Scottish Power spokesman said the explosions were caused by an overload of power, after the supply to the George Square substation was switched off.
He explained: “We needed to switch off the electricity as a precaution. This affected a lot of the city centre and the south of the city.
“We were doing some work in the area at the time. We were doing routine work to switch electricity supplies, and that must be how this must be how it started.
“We apologise for any inconvenience caused and investigation into what went happened is underway.”
Councillor Mark McInnes, who represents the Meadows and Morningside, visited the Maxwell Street substation after hearing about the blasts from residents.
He said: “About five paving stones have been blown up.
“Fortunately nobody was hurt. It could have been a lot worse if anyone had been passing at the time. This is a well-used part of the pavement.”
Keith Anderson, from Greenbank Road, Oxgangs, was one of the thousands who were without power last night. He said: “I just came home and all the street lamps were off. We had to use candles and torches. One of the most annoying things was lots of house alarms were going off.
Four fire crews fought the blaze in George Square Lane after Scottish Power engineers isolated the unit and switched off electricity.
A spokeswoman for Lothian and Borders Fire and Rescue said that the fire was under control by 6.40pm. The fire crews left the scene at 8.37pm.
She said: “It had all cooled down and Scottish Power were dealing with the incident.”
The Commonwealth Pool was among the buildings affected by the power cut, and people using it at the time were evacuated for safety reasons.
Witnesses reported traffic slowing down to a near standstill in Oxgangs and Bruntsfield.
Commuter Allan Stewart, 29, a recruitment consultant, said: “Loads of traffic lights and street lights were out, burglar alarms triggered by the cut were going off.”