Updated

A construction crew struck an underground petroleum pipeline Tuesday, sparking an explosion and fire that killed at least two people, burned several nearby buildings and shot flames high in the air.

Six people were injured in the blast, three critically. At least two people were missing early Wednesday.

The explosion occurred in a residential area within sight of downtown Walnut Creek, a suburb about 25 miles east of San Francisco (search), and a few blocks from a high school, which was evacuated as a precaution.

The construction crew was working on a public water project, said Contra Costa County fire marshal Richard Carpenter. The victims are believed to have been on the crew.

"They were working in a trench on some pipelines," he said. "We don't know how many people were down there at the time."

The bodies of the three workers were found about 5 feet from where the explosion happened, said Steve Mailer, a spokesman for the Contra Costa Fire Prevention District (search). They were not immediately identified.

The subsequent fire spread to a nearby home, which sustained major damage, and three apartment buildings. No one inside any of the buildings was injured. As many as 270 homes or businesses were evacuated or cautioned about the incident, Mailer said.

The ruptured pipeline is owned and operated by Kinder Moorage Energy Partners, a Houston-based distributor of refined petroleum products. It carries gasoline, diesel and jet fuel from Concord to San Jose. It was shut down, said Larry Pierce, a company spokesman.

Pierce said a contractor working for the East Bay Municipal Utility District was excavating and ruptured the line. The state fire marshal was investigating to determine the cause of the explosion and whether the crew called regulatory agencies ahead of time to determine the location of gas lines before digging.

The construction work was being done by Mountain Cascade, a Livermore, Calif.-based company that specializes in pipeline work, said Charles Hearty, a spokesman for the utility district. It was unclear whether the victims were Mountain Cascade employees or subcontractors, he said.

The three critically injured victims had second- and third-degree burns over 40 percent to 60 percent of their bodies. Two were receiving breathing support, a doctor told the Contra Costa Times.