A straphanger was strangled early Sunday when his T-shirt was pulled into an MTA escalator.

Police responding to the Intervale Station on the No. 2 and 5 lines in the Longwood section of The Bronx at about 3:45 a.m., found the man unconscious at the top of the escalator with part of his shirt caught in the mechanism and the neckline choking him, cops said.

Officers cut the shirt off and FDNY medics rushed the man to Lincoln Hospital, where he was pronounced dead.

Officials identified the victim as Carlos Alvarez, 48, of The Bronx.

Surveillance video captured Alvarez trying vainly to free himself, WPIX/Channel 11 reported.

It was “an accident,” said one MTA worker who declined to give his name. “Somebody fell and went all the way up.”

A witness Giovanni Fernandez, said passers-by tried to help Alvarez. “When I got off the train, I saw the guy stuck on the escalator. A lot of people were surrounding him,” he told The Post.

“He was at the top. I saw the blood [near his head]. His head was split open. All you see is this guy sprawled face down.”

MTA spokesman Shams Tarek said, “This is a tragic and unusual incident which is under investigation. Our thoughts are with this man’s family and friends.”

Additional reporting by Max Jaeger