A break on the 6-inch line was reported around 1 p.m. Thursday on 15th Avenue near Ulloa Street.
Customers on 15th Avenue between Ulloa and Taraval streets were affected by the break. Water service was shut off until about 7:45 p.m., SFPUC spokeswoman Amy Sinclair said.
Repairs on the 81-year-old cast-iron pipe that ruptured were completed around that time, Sinclair said.
The main break disrupted service on San Francisco Municipal Railway's L-Taraval light-rail line. Shuttle buses transported passengers heading outbound beyond the West Portal station.
Service was back on schedule by 8 p.m., Sinclair said, and on Friday morning trains were running as usual.
The main break was less destructive than one that occurred on a 16-inch line a few blocks away nearly a year ago.
Early on Feb. 27, 2013, the main broke at 15th Avenue and Wawona Street, sending rushing water flooding into 23 homes and a dozen cars.
In the aftermath of the flooding, three homes were red-tagged and several others were yellow-tagged.