Work crews digging near 68 Boyd Street in Portland ruptured a gas line, leading to the evacuation of a nearby child care center and apartment building.
Firefighters responded to the leak at 11 a.m.
Because there was an odor of gas in nearby buildings, they evacuated occupants, said Fire Chief Jerome LaMoria.
Nobody was hurt and people were allowed back in the buildings at 11:40 a.m. once the gas leak was stopped and firefighters determined it was safe to return.
LaMoria said that when people smell gas they should leave immediately, leaving doors and windows in the position they are in, and call 911.