The problem started at about 9:30 a.m., disrupting service on the L-Taraval line between the West Portal station and Taraval Street at 22nd Avenue.
A bus bridge was provided for L-Taraval riders until the water main was repaired around 3:45 p.m.
Some businesses in the area temporarily lost water but all but two regained it by 2 p.m., said Public Utilities Commission spokeswoman Suzanne Gautier.
The water main failure appeared to be due to age, said Gautier.