Service on the B and D subway lines was near normal Thursday afternoon after workers repaired a broken rail, the MTA said.

Service on the lines was disrupted for hours after a track geometry car detected the broken rail about 12:45 p.m. on the southbound tracks south of 7th Avenue, the MTA said.

After rerouting the B and D lines and suspending some service, the MTA said trains were running on their normal routes and schedules by about 3:30 p.m.

For the latest on subway conditions, go to amny.com/transit