A man randomly slashed a straphanger at a subway station in Union Square over the weekend, police said.

Police released a surveillance image of the suspect and allege he attacked a 29-year-old man who had just exited an L train and was about to leave the 14th Street – Union Square subway station around noon Saturday.

As the victim was walking toward the exit, he felt a sharp object slicing across his back and confronted the suspect.

He tried to chase attacker, who got away by running onto an L train, police said.

The victim was taken to Beth Israel Hospital with minor injuries.

Police said the two men did not have any interaction with each other before the attack.

The suspect is described as a Hispanic man in his 30s or 40s who was last seen wearing a camouflage shirt and dark sunglasses, police said.