NEW YORK (CBSNewYork) — A man tried to rob a uniformed NYPD officer – and even addressed him as “officer” while doing so – on a downtown Brooklyn subway platform Saturday, police alleged.

Officer Daniel Mervis, who is assigned to Transit District 30, was standing on the southbound A Train platform at the Jay Street-MetroTech station around 10:40 a.m. Saturday, police said.

READ MORE: Timo Meier Scores Twice In Sharks' Win Over Devils

NYPD Officer Daniel Mervis arrested a suspect who allegedly tried to rob him at the Jay Street-MetroTech subway platform on Saturday, Oct. 17. (Credit: CBS2)

NYPD Officer Daniel Mervis arrested a suspect who allegedly tried to rob him at the Jay Street-MetroTech subway platform on Saturday, Oct. 17. (Credit: CBS2)

A man came up behind Mervis holding what appeared to be a barber-style straight-edged razor, and said, “Officer, open your pockets,” police said.

Mervis turned around quickly and saw the suspect standing to the side of him on the platform – about 15 feet in front of him – with the razor in his hadn, police said.

READ MORE: Paterson, N.J. Doubling Down On Vaccination Efforts As Omicron Variant Inches Closer

Mervis took out his service gun and demanded that the man drop the weapon. Mervis kept repeating the order until the suspect came within three to five feet of him and finally dropped the weapon to the ground, police said.

Mervis then ordered the suspect to turn around and put his hands behind his back, and arrested him without incident, police said.

The suspect – Joshua Muniz, 24, of Brooklyn – was charged with attempted robbery and criminal possession of a weapon, police said.

MORE NEWS: Street Closures Planned In Midtown For Rockefeller Center Christmas Tree Lighting Ceremony

Officer Mervis was appointed to the NYPD on Jan. 14, 2009.