The leak began around 8:05 a.m. on 26th Avenue between Clement and Geary streets, PG&E spokesman Joe Molica said.
He said the main was breached by a third-party contractor doing excavation work on 26th Avenue.
PG&E stopped the leak at 8:49 a.m. Gas service to 28 customers was temporarily interrupted, he said.