A 33-year-old man stole a teen’s cellphone on Tuesday morning and attacked another man before jumping onto the tracks and getting struck by a train at a Queens subway station while trying to get away, police said.

The suspect first grabbed the 13-year-old boy’s phone at about 7:40 a.m. while riding on a Manhattan-bound M train.

A second rider tried to intervene, but the suspect attacked him, punching him in the face and giving him a bloody nose, according to the MTA.

When the train pulled into the Northern Boulevard station, the suspect tried to run, heading toward 65th Street.

A few minutes later, according to the agency, the conductor of a 179th Street-bound F train “heard a sound as if something struck the side of the train.” The suspect, who appeared to be wearing a cast on his arm, had apparently been sideswiped by the train, according to the agency.

The suspect was taken to Elmhurst Hospital Center, suffering from scratches and bruises. He had not yet been charged as of Tuesday afternoon.

The incident stranded straphangers during Tuesday’s rush hour, halting service on the M, F, E, and R trains. Service was temporarily suspended between various stops and Forest Hills-71st Avenue in both directions, but resumed just before 9 a.m., forcing the MTA to warn passengers of “extensive delays.”