A New York City subway worker was dragged under a train and killed early Wednesday, officials said.

The fatal accident happened at about 12:15 a.m. just south of the Macy's-Herald Square station in Manhattan, Metropolitan Transportation Authority officials said.

The 57-year-old employee was working as a flagger when he somehow got dragged under a northbound D train, officials said. He was taken to Bellevue Hospital, where he was pronounced dead.

NYC CARJACKING SUSPECT LIES IN FRONT OF BUS, STANDS ON SUV: 'HE ALMOST KILLED LIKE 4 PEOPLE'

"There was work taking place, scheduled work. The fellow was flagging, and it's very much still under investigation on what went wrong." MTA Chair Janno Lieber said at a meeting of the MTA board's safety committee. "Our folks were at the hospital last night with the worker’s family. Obviously they’re very much in our thoughts right now."

New York City subway train

A 4 train arrives at the Union Square subway station on April 4, 2021, in New York City.  (Photo by Gary Hershorn/Getty Images)

Flaggers are supposed to help promote safety by alerting oncoming train crews to track work further down the line.

NYC Transit President Rich Davey, who is in charge of the city's subways and buses, asked for a moment of silence for the fallen worker. "These are dangerous jobs that we ask our people to do day in and day out," Davey said.

CLICK HERE TO GET THE FOX NEWS APP

The National Transportation Board said it was sending a team to investigate the death.