Firefighters have determined that an extension cord was a contributing factor in an electrical fire that damaged two businesses in Ottawa's Byward Market.

Ottawa Fire Services says the extension cord was used for permanent wiring in the building, and contributed to the accidental blaze.

The fire started in a basement shared by Bang-On and Allegro clothing stores on William Street, next to the Byward Market Square, at about 6:30 a.m. Tuesday.

Both stores were unoccupied at the time.

Firefighters say the blaze was a challenging one to fight because the building is old and has undergone extensive renovations over the years.

"Crews have to make sure they get through all the layers of walls and floors before they can be assured the fire is out, located all possible places where fire can hide," said Marc Messier, a spokesperson for Ottawa Fire Services.

The fire was under control by 8 a.m.

Firefighters are now reminding residents that extension cords should not be used on a permanent basis.

Ottawa Fire Services says air conditioners and other heavy appliances should be plugged directly into an outlet. If that's not possible, a 14-gauge, three-wire grounding type appliance extension cord can be used.

If you require more outlets, additional ones should be installed by a licensed electrician.

Residents are also advised to avoid running cords under carpets or in other locations where they can be damaged and cause fire.