Construction crews struck a three-inch gas line near the intersection of Viking and Ruth Drive at 2:28 p.m. Thursday.
As a precaution, students who were dismissed from class at College Park High and Valley View Middle Schools were directed away from the scene. Classes were also affected at the nearby campus of Diablo Valley College.
The gas leak was capped without incident around 4 p.m. Residents were being told that it was safe to return to their homes shortly thereafter, according to Pleasant Hill Police Department spokesperson Lt. Peter Enea.
The gas leak caused power outages and traffic jams in nearby areas.