A New York City man narrowly missed being crushed beneath a subway train after a hammer-wielding attacker making homophobic comments fought with and then tossed a 21-year-old straphanger onto the tracks before fleeing the station, officials said.

The New York Police Department said the incident happened Nov. 11 at 1 a.m. at the Tremont Avenue B/D Train subway station in the Bronx.

The victim told police he was waiting on the northbound platform when a man began making anti-gay statements to him and then attempted to hit him with a hammer -- but missed.

COUPLE HAD SEX ON NEW YORK SUBWAY PLATFORM IN FRONT OF RIDERS, POLICE SAY

"The individual continued to struggle with the victim and threw him onto the train track," police said.

A group of Good Samaritans nearby were able to alert the motorman to stop the arriving train and prevent a potential tragedy. The 21-year-old was then helped back up onto the platform.

The NYPD on Tuesday released a sketch of the suspect wanted in the attack.

A sketch of the suspect wanted in the Nov. 11 attack in the Bronx. (DCPI)

NEW YORK CITY 'F--- THE POLICE' PROTEST TURNS VIOLENT, DOZENS OF ARRESTS REPORTED

The 21-year-old victim, who was not identified, was transported to Saint Barnabas Hospital where he was treated for lacerations and contusions to his head, according to the NYPD.

CLICK HERE FOR THE FOX NEWS APP

The NYPD's hate-crime task force is investigating.

Anyone with information regarding the incident is asked to call the NYPD's Crime Stoppers Hotline at 1-800-577-TIPS, or submit tips by logging onto the CrimeStoppers website, or on Twitter @NYPDTips. Police said that all calls are strictly confidential.