The two cars uncoupled at about 5:50 p.m. in the tunnel, which connects Duboce Avenue and Noe Street with Carl and Cole streets, Muni spokesman Murray Bond said.
He said no one was injured in the incident and passengers exited the train and walked through the tunnel.
Bond said such an occurrence is "extremely rare" and that investigators are working to determine what caused the train to come apart.
However, Bond said, "The train did what it's supposed to do; the train stopped."
Bus shuttles provided substitute service as the train was removed from the tunnel, and Bond said regular service resumed at about 6:30 p.m.