At about 2:46 p.m., construction workers hit a 1.25-inch gas line at an apartment building located at 2811 McKee Road, fire Capt. Chuck Rangel said.
A PG&E crew shut off the gas at about 4 p.m., he said.
Occupants of 16 units were initially evacuated, but are now returning home, he said.
The incident also prompted the closure of McKee Road in both directions from Capitol Avenue to Challenger Avenue. The road has been reopened.
No injuries were reported.