Puget Sound Energy crews responded to a reported gas leak on Southeast Eighth Street just east of 228th Avenue Southeast in Sammamish on Monday morning.
A contractor performing some excavation accidentally hit a service line to Skyline High School, PSE spokesman Roger Thompson said.
The workers called PSE at about 10:15, and crews responded and shut off the valve to that pipe by about 10:45, Thompson said.
City officials said that Sammamish police temporarily closed a portion of Eighth for about a half hour while the situation was resolved.