A man who pulled out a pistol and fired it on a New York City subway platform in an apparent attempt to stop someone from stealing a woman’s purse was charged Thursday with criminal possession of a weapon and menacing.

No one was struck by the gunshots Tuesday inside the station, located a few blocks north of Times Square.

Authorities said John Rote, 43, intervened when a man who had been asking riders for money near the turnstiles at around 9 p.m. tried to grab a 40-year-old woman’s purse.

According to prosecutors, he pulled a gun from his bag and fired at least one shot on the platform, before fleeing the scene and disposing of his firearm.

Security camera footage published in the New York Post showed part of the confrontation.

“I’ve looked at the video,” New York City Transit President Richard Davey said at a news conference Wednesday. “It’s, I would say unusual. He sort of looks very calm, pulls out a gun, fires two shots, calmly puts the gun back in the bag and walks away.”

“The point is, that’s not what we need from anybody in this system,” he said.

Rote is originally from West Virginia and has ties out of state, but no criminal history, according to the Manhattan District Attorney’s Office. His attorney did not respond to a request for comment.

“Thank goodness nobody was hurt here — but what happened was outrageous, reckless, and unacceptable,” Davey said in a statement released after Rote was arrested.

The mugger Matthew Roesch was arrested as well for charged of attempted robbery.