A broken water main in Greenwich Village snarled this morning's rush hour commute on a host of subway lines.

The 36-inch cast-iron pipe originally installed in 1877 broke shortly before 12:15 a.m. at 13th Street and Fifth Avenue, with water gushing down to the West 4th Street station causing service disruptions and changes on the B, D, F, M, A, C, E, Q and J lines. Manhattan buses in the area were forced into detours.

Regular train service was restored at 10:25 a.m., but residual delays slowed train service, according to the MTA.

A 300-foot stretch of track north of the West 4th Street station was flooded with about 24 to 30 inches of water, according to the MTA.

MTA spokesman Kevin Ortiz said drains in the system were able to absorb the water and were in good working condition due to Fast Track repairs on the corridor. There was also a pump room at 9th Street and portable pumps in the area that handled the water.

"We really didn't end up with that much water down there, which is pretty amazing," he said.

Ortiz said crews will repair and replace train switches after tonight's evening rush.

The leak was under control around 5 a.m. when the Department of Environmental Protection shut valves on the main beneath Fifth Avenue. Crews continue to excavate down to the broken water main to determine whether the pipe can be repaired or replaced, a process that could take days, a DEP spokesman said. The spokesman added that the age of the pipe and recent swings in temperature likely played a role in the leak.

Currently, there are 10 commercial buildings without water on Fifth Avenue between 12th and 14th streets. Repair work also caused 75 residential customers on 10th Street between Fifth and Sixth avenues to have their water shut off. The DEP said crews are working to restore service as soon as possible.