Power has been restored after a massive fire at a lumber yard in Pembroke left most of the city in the cold and dark overnight.

The fire burned into the night at the former International Lumber building, now owned by Lavern Heideman and Sons. Flames broke out at the building on Boundary Rd. between 8:00 and 8:30 p.m. Wednesday.

A major hydro supply line from Hydro One was taken out in the fire and was to blame for the power being out to most of the city.

"The hopper collapsed putting live wires down, which put all of Pembroke out of power," said Pembroke Fire Captain Gary Lowe.

"This is one of the largest, most challenging fires I've ever been a part of."

"It didn't matter where you were coming from within the city, this is what you could spot," said Pembroke Mayor Michael LeMay.

"It was one big great orange flame."

Pembroke Fire Chief Daniel Herback says a portion of the building collapsed onto a transformer, which is what caused the large-scale power outage.

Ottawa River Power Corp. says power wasn't expected to be back on until approximately 10:00 a.m. Thursday. Many residents lost power when the fire started.

However, the power company gave an update at around 6:30 a.m. saying that overnight crews were able to switch everyone back on a few hours ahead of schedule.

"We are looking at all options to ensure that our employees continue to work and that our customers needs are met," said Kris Heideman of Lavern Heideman and Sons in a statement to CTV News.

The company employs 26 people at their Pembroke mill.

"The people of the Ottawa Valley are well-known for moving ahead," said LeMay.

"We'll get there, we'll get back on top."

The cause of the fire remains unknown. Firefighters remained on scene into the afternoon Thursday to take care of hot spots.

No one was hurt. The Ontario Fire Marshal is investigating.