An electricity outage affected thousands of customers in the eastern part of Toronto's downtown before power was restored early Friday morning.

Toronto Hydro reported that the outage was bounded by Carlton Street to the north, Queen's Quay to the south, York Street to the west and Bayview Avenue to the east.

Hydro spokeswoman Jennifer Link said about 6,500 customers were affected by the outage, which began at about 8:15 p.m. Thursday.

Power was restored for all of the affected customers following several hours of repairs, according to a Twitter post from the utility shortly after 4 a.m.

Toronto fire officials at the scene said that a piece of equipment overheated in an electrical substation at George and Adelaide streets.

Fire crews had to clear the building of smoke before Toronto Hydro could assess the damage.

The outage comes as the heat and humidity are forecast to be extremely high on Friday, with the humidex approaching 50 C.

"Equipment fails from time to time," said Tanya Bruckmueller, another Toronto Hydro spokeswoman.

"It happens, but specifically in times where there's sustained heat waves like we've had over the last three days, equipment doesn't have the opportunity to cool down and it is susceptible to failure."

St. Michael's Hospital was among the affected buildings. Toronto police said Thursday the hospital ran on emergency generators and did not move any patients.