Inbound Muni light-rail trains in San Francisco were shut down for four hours during the height of Tuesday morning’s commute along the N-Judah line from Ocean Beach to the Sunset Tunnel at Duboce Park.

Malfunctioning overhead wires at Duboce Avenue and Church Street forced a closure around 7:15 a.m. Service on the N-Judah was restored around 11:15 a.m., officials said.

Muni dispatched bus shuttles from Ocean Beach to Church and Duboce while crews worked to fix the power issue.

Matt Wright, 25, lives in the Outer Sunset and rode a packed shuttle into downtown San Francisco after waiting roughly 20 minutes for a bus.

"For me it's getting to the point where I'd rather drive to Daly City and take BART down to the Embarcadero where I work," he said aboard the bus. "I can plan for delays on BART. But this — it's like you don't know."

Evan Sernoffsky and Hamed Aleaziz are San Francisco Chronicle staff writers. Email: esernoffsky@sfchronicle.com haleaziz@sfchronicle.com Twitter: @EvanSernoffsky @haleaziz