A dramatic rescue at the Avenue H subway station in Midwood — all captured on video.

Liliana Vicente says she was waiting at the end of the platform when she spotted the man lying unconscious on the tracks.

A train was approaching — so she and some fellow straphangers started yelling to get the operator to stop, which he did.

"Unfortunately I thought the worst and I was not believing my eyes and he was there and sleeping," Vicente said. "You see that train coming you're waving your hands. Yeah, and every time the train started approaching I started and crying there and that's why I thought the worst."

Vicente and others then climbed down to the tracks to help the man back to the platform.

He was taken to the hospital in serious condition.