The Hayward Fire Department received a call at about 10:30 a.m. that a utility crew working near the curb just south of Foothill Boulevard and Grove Way had ruptured a 2-inch plastic pipe, Capt. Thor Poulsen said.
A nearby Taco Bell was evacuated because of the hazard posed by the gas leak, and Foothill Boulevard between City Center Drive and Grove Way was closed.
Two engines, a fire truck, and a battalion chief stood by and had laid fire lines in case the gas ignited, Poulsen said, which would have caused "a major, major problem."
PG&E arrived at about 11:15 a.m. to begin repairs by pinching the line, which serves businesses on the northern side of Foothill Boulevard, Poulsen said.
Repairs were completed early this afternoon, and the roadway reopened at about 12:30 p.m., Poulsen said.
That stretch of Foothill Boulevard is about one block from entrances leading to I-580 or Interstate Highway 238, and drivers were asked to take alternate routes during the repairs.