Someone get this guy a cape.

A dad jumped onto the subway tracks to save his baby girl in Manhattan on Thursday after her stroller suddenly rolled away from him and plunged off the platform, according to police.

The father, 8-month-old girl and another child were at the 72nd Street-Broadway station on the Upper West Side just before 9:20 a.m when the lock on the baby’s stroller malfunctioned and it headed toward the uptown 1-train rails, cops and transit workers said.

The dad quickly leaped onto the tracks to pull his little one to safety before a train could pull in — and was joined by a good Samaritan, who helped haul the stroller back onto the platform, cops said.

“The stroller rolled away from the man and the baby in the stroller fell on the tracks,” one station worker told The Post.

“But they got the baby up off the tracks right away. Thank God the baby wasn’t hurt.”

Amazingly, the child only suffered a small bump on the back of her head, police said.

The rattled dad was later seen clutching his teary-eyed baby in the back of an ambulance.

They were taken to Lenox Hill Hospital for treatment, according to the FDNY.

One MTA worker said it’s incredibly lucky the incident didn’t end in tragedy.

“These trains come into the station every three minutes, they got so lucky,” she said. “How the hell do you let the stroller roll away from you like that?”

Fortunately, trains were quickly notified about the baby on the tracks thanks to a quick-thinking No. 2 train operator.

He witnessed the incident from an adjacent track and reported it to the Rail Control Center, which in turn called the police, according to the MTA said. Local and express service on the line was held for only about five minutes.

“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,” New York City Transit head Andy Byford said in a statement.

The operator’s union boss also heaped praise on him.

“Our Train Operators have to be alert for anything out of the ordinary along the tracks, and this Operator was definitely at the top of his game this morning, Thank God,” Transport Workers Union Local 100 president Tony Utano said in an e-mail.

“He very well may have saved this little girl’s life and The Transport Workers Union Local 100 couldn’t be prouder to call him a member.”

Additional reporting by Danielle Furfaro