A teacher at John Muir Elementary School, located at 380 Webster St., smelled gas in the entryway of the school shortly before 12:45 p.m., San Francisco Unified School District spokeswoman Gentle Blythe said.
No students or staff members were sickened, but as a precaution, school officials called the fire department and PG&E and evacuated the building.
The students were at indoor lunch/recess at the time of the incident, Blythe said.
Fire crews detected only a faint odor in the main lobby, fire department spokeswoman Mindy Talmadge said.
Students were released to go back inside within about 15 minutes, Blythe said.
PG&E remained on scene checking for any possible gas leaks this afternoon, utility spokesman Joe Molica said.
The odor appears to have come from the boiler room, but the exact source remains under investigation, Molica said.