VANCOUVER -- An explosion that rocked a Richmond, B.C. apartment building earlier this year was partly caused by workers failing to turn off a gas supply valve, according to a new report.

Firefighters said four units were damaged when the blast erupted at a four-storey apartment complex on the outskirts of Steveston Village back in July.

Fortunately, no one was hurt.

"The outcome could have been much worse," said Jeff Coleman, director of risk and safety knowledge with Technical Safety BC.

On the day of the explosion, a team of gas contractors were at the No. 2 Road property to retrofit an apartment's fireplace.

According to an incident report from Technical Safety BC, the workers damaged a pipe that feeds gas into four units, which led to a leak on the fourth floor that was ignited by an active pilot flame.

A summary of the findings determined a "primary contributing factor was the natural gas supply valve not being turned off." The contractors also failed to check for gas leaks after the work was complete.

Coleman said the contractors did turn off the valve that supplies gas directly into the fireplace, but that wasn't enough to ensure the building's safety.

"While it might be inconvenient sometimes to affect other suites in a common piping system by turning the gas off, it's important," Coleman said.

Technical Safety BC said the accident should serve as a reminder that crews should always cut off the gas supply upstream of the unit they're working on, and test for leaks after finishing the job.

A pressure test on the pipe would have immediately detected a problem so that crews could have begun troubleshooting a solution, Coleman said.

The explosion caused a minor fire at the building but it was extinguished quickly. Firefighters said there was only some smoke coming out of the complex by the time they arrived.

The building had working smoke alarms, which helped alert everyone in the building so they could get outside safely.