More than 9,000 homes and businesses in San Francisco lost power on Wednesday night when equipment in an underground Pacific Gas & Electric Co. vault caught fire.

San Francisco fire Battalion Chief Mark Hayes told The Chronicle a power surge in an underground vault prompted a “small fire,” which firefighters extinguished.

At the corner of Laguna and Hayes streets, firefighters blocked off the intersection with flares and yellow caution tape. Workers from at least two blue PG&E trucks were examining an electrical transformer, which onlookers had said popped earlier in the night. Workers lowered themselves underground through metal coverings in the sidewalk and investigated the area.

The outage affected PG&E customers in the Hayes Valley and Haight-Ashbury areas and blacked out the War Memorial Opera House during a performance of the San Francisco Ballet. The performance was canceled because of the outage, according to ballet officials.

At German restaurant Suppenküche, located across the street from the incident at Laguna and Hayes, workers closed its kitchen and stopped serving Wiener Schnitzel after the outage, but kept pouring beer for customers in the darkened restaurant.

“It tastes even better in the dark,” said Brian Jones of his Pilsner. He joined other customers who stayed in the restaurant despite the outage, their beers only lit by a dozen table candles.

Rachel Skay, a San Francisco resident who lives a few blocks away from the site of the surge, used the flashlight feature on her iPhone to check out the scene in person. She described the darkened streets as eerie and scary.

“You can’t see your surroundings,” Skay said.

Meanwhile, the piano music continued at a darkened Noir Lounge. Residents dined in ill-lit restaurants and the twinkly lights strung along the sidewalk were dark bulbs.

PG&E spokeswoman Karly Hernandez said the outage began at 7:52 p.m. Crews at the scene determined the outage was caused by an underground equipment failure, she said.

All customers impacted by the outage had their power restored at 9:43 p.m. Wednesday, Hernandez said.

Lauren Hernández is a San Francisco Chronicle staff writer. Email: lauren.hernandez@sfchronicle.com Twitter: @LaurenPorFavor