A dad saved his 8-month-old baby when her stroller rolled onto the subway tracks at an Upper West Side station during rush hour on Thursday.

The incident happened around 9:20 a.m. at the narrow 72nd Street southbound 1/2/3 subway platform. According to the NYPD, the baby's stroller lock malfunctioned with the tot in it, and it rolled onto the tracks. The dad, who was also with his wife and another toddler, jumped down and with the help of a good Samaritan, brought the baby back up.

A train operator running a northbound 2 train across the platform saw the baby fall and reported the incident to the Rail Control Center. Thankfully, no trains were approaching the station at that moment. "These trains come into the station every three minutes, they got so lucky," an MTA worker told the Post.

The baby suffered a "small bump" on the back of her head, and was taken to Lenox Hill Hospital for treatment.

"We're so glad this incident was resolved quickly with apparently no serious injury and are proud of our front line employees, from an eagle-eyed train operator to the attentive team at the Rail Control Center, who did a great job in reporting and acting on this immediately," NYC Transit President Andy Byford said in a statement.