Residents of three Coquitlam, B.C., apartment buildings returned home just after midnight after spending almost eight hours out of their homes after an excavator ripped through a gas line.

The leak occurred Tuesday afternoon after an excavator hit a gas line on North Road between Smith Avenue and Foster Avenue.

RCMP Staff Sgt. Mark McCutcheon said the leak impacted several city blocks, and emergency officials were forced to close one major road. Nobody was hurt in the incident.

Officials brought in buses to shelter evacuated residents and an information centre was set up at a nearby community centre to keep evacuees informed.

TransLink spokesman Drew Snider said buses were rerouted around the area, and the transit service cancelled 16 stops on the affected road.

Fortis B.C. was able to shut off the gas and repair the ruptured pipeline shortly after midnight. City officials said it was not yet clear if the maps of gas lines in the area were wrong or if some other misunderstanding caused the problem.