A Miami doctor saved a stranger who fell onto the PATH tracks in the West Village just as a train was pulling into the station.

Ben Abo, 32, an ER doc and former paramedic, was standing on a crowded platform at the Ninth Street stop at around 10:30 p.m. Wednesday when the man suffered a seizure and teetered at the platform edge.

“He just went down — thump. His head hit the rail, and he was just down for the count,” said Abo, who is originally from Cherry Hill, NJ, and works at Miami Beach’s Mount Sinai Medical Center.

The doctor leaned over the platform and yelled down at the man who was sprawled on the tracks.

“He wasn’t responding at all,” Abo recalled.

Abo had somebody pull an alarm before he leapt into the gutter just as a train was “30 seconds away.”

Fellow passengers watched as Abo and another good Samaritan rescued the man.

“We jumped down and tried to lift this guy up,” he said. “And that’s when I looked to see if a train was coming in the distance.

“You could see the lights reflecting off the walls.”

Abo said the victim, who was not identified, was with two women, one of whom tried to wake him.

“She was frantic and screaming for him to wake up,” Abo said.

The victim, the fellow hero and the screaming woman were hoisted over the edge to safety. Abo was last — and barely made it.

“You hear the train sounds, and you hear yelling, and you have that gust of wind coming,” he said.