The break occurred around 11:30 a.m. in the 4500 block of 20th Street near Douglass Street, where a third-party contractor struck a 2-inch gas main pipeline with a backhoe, according to PG&E spokeswoman Andrea Menniti.
Public safety officials told residents to shelter in place while PG&E crews responded to the scene.
The leak was capped and the shelter-in-place order was lifted by 12:11 p.m., Menniti said.
Two customers have had their gas service affected while PG&E continues to make repairs.
PG&E has an 811 number for contractors and residents to call before doing any digging or construction to identify the locations of gas lines in the area.
In this case, it appears the contractor did call 811 and identified the location of gas lines, but was not careful enough.
"It's important to hand dig around gas lines for caution," Menniti said. "Contractors who hit gas lines are responsible for repair costs."