BANGOR, Maine — Residents of Fern Street woke up to a strong odor Friday morning after an excavator hit a natural gas line, causing a leak that forced the evacuation of several homes and the road to be closed.

Bangor firefighters and Bangor Gas crews were dispatched to the area of 60 Fern Street about 8:40 a.m. Gas was escaping from a hole in the ground when authorities arrived, Bangor Assistant Fire Chief Darrell Cyr said.

“We kept on dissipating the gas with water until Bangor Gas showed up,” Cyr said.

Andrew Barrowman, a marketing and sales manager for Bangor Gas, said a contractor doing sewer work hit a gas distribution system, causing the leak, which has been contained.

Bangor Gas officials shut off natural gas in the area, while Emera Maine officials also shut off power, according to Cyr.

While there was no danger to the public, Cyr said officials weren’t taking any chances with the potentially lethal gas.

“Natural gas is explosive,” the assistant chief said.

“Everything is safe,” Barrowman added. “Right now our key focus with the fire department and the public is to make it safe, and that’s what we’re doing.”

Homes on Fern Street up to Garland Street were evacuated, Cyr said, along with parts of nearby Pearl and Birch streets. Bangor police assisted firefighters with the evacuation, and the assistant chief said it wasn’t clear exactly how many homes were evacuated.

Curtis Chapet, who lives in an apartment near the corner of Fern and State streets, immediately smelled the odor upon getting to the street.

“I got dressed and opened the door and could smell this huge waft of gas,” he said.

Firefighters blocked off Fern Street at State and Garland streets, Cyr said, and the area was expected to be closed for much of the day Friday.

Barrowman said later Friday afternoon Bangor Gas crews will be conducting safety checks in the area once residents return home, and things were expected to be back to normal by Friday night.

“I thought it went very smoothly with our crews responding so quickly,” he said.