Flames shot from the roof of a three-story building in West Philadelphia for hours early Monday as firefighters battled freezing temperatures to bring the blaze under control.

The fire broke out around 4:45 a.m. inside the Locust Medical Center building at 52nd and Locust Streets, fire officials tell NBC10. Fire crews struck a second alarm shortly after arriving on scene.

The building houses doctor's offices and other medical facilities. Officials on scene originally said the building was abandoned, but that was determined not to be true.

The fire was placed under control just before 6:30 a.m., officials said. 52nd Street remained closed between Chestnut and Spruce Streets because of the fire activity.

No one was hurt, but a combination of gusty winds and extreme cold made knocking down the blaze difficult.

Water being used to fight the fire froze to about an inch thick on sidewalks, cars and trees nearby, crews on scene tell NBC10. On the building, which was constantly doused with water, an even thicker coating of ice blanketed walls and power lines.

Philadelphia Fire Department Deputy Chief James Bonner said firefighters were slipping and falling "all over the place."

Some crews were forced to smash ice off of their trucks before they could leave the scene and not all of the equipment is ready to be put back into service.

"We don't shut down hose lines because you have to keep the water moving," Bonner said. "You'll literally have a hose line that's a log of water and we have many companies leaving this fire ground today with just logs on top of their trucks and they have to go back and thaw everything out."

Officials contacted fire departments in Canada looking for advice on thawing out equipment. They also asked for tips to keep hoses and other equipment from freezing at fire scenes as the Arctic cold is expected to linger for the rest of this week.