A man in an MTA uniform robbed a subway rider at knifepoint in Harlem last week, police said.

Surveillance video captured the man in a blue MTA shirt standing near the MetroCard machine at the 125th Street stop for the A, C, B, D lines early on July 26.

That's when authorities said he walked up behind a 55-year-old rider just before 4 a.m., held a knife to the man's neck and stole his backpack.

Police said they are investigating whether the suspect is an actual MTA employee.

"You know, you're in the subway and you’re used to random craziness," one subway rider said. "But to actually get attacked by someone you think would be safe is disconcerting to say the least."

Anyone with information about the robbery should call Crime Stoppers at 800-577-TIPS.