NEW YORK (Reuters) - Prosecutors have dropped their case against a retired New York City police officer arrested outside Trump Tower and accused of resisting U.S. Secret Service agents protecting Republican presidential candidate Donald Trump, a court filing on Friday showed.

Anthony Shark, 54, was arrested on Aug. 2 after refusing instructions to leave a street outside the building that agents had closed off while protecting Trump, according to a criminal complaint filed at the time in Manhattan federal court.

The complaint said Shark, who was carrying a firearm in a holster, tried to push through a human wall that agents formed to prevent him from moving forward, and grabbed at agents as they sought to restrain him.

The Secret Service at the time said in a statement that the arrest took place just prior Trump's motorcade arriving and that agents later determined Shark had a lawful gun permit.

Shark worked near Trump Tower as a security guard at luxury jeweler Harry Winston's headquarters in Midtown Manhattan, his lawyer said.

According to Friday's filing, U.S. Magistrate Judge James Francis approved a request by prosecutors to dismiss the complaint against Shark, which charged him with one count of assaulting and resisting a Secret Service agent.

No reason for the case's dismissal was given.

"I'm thrilled that the prosecutors listened to Mr. Shark's side of the story and came to the right decision," said Annalisa Miron, his lawyer.

A spokesman for Manhattan U.S. Attorney Preet Bharara, whose office was prosecuting the case, declined comment.