Inside the vehicle, police also found a bullet-resistant vest, a ski mask and a knife. Serial numbers on two guns had been filed off.

Prosecutors said Medard was wearing his police-issued handgun and had another gun hidden under his seat when he was nabbed.

"We have reason to believe the defendant was part of a plan to shake down and rob drug dealers in the area," said a prosecutor, Joshua Steinglass, according to the New York Times. However, the only charges brought against the men in court were weapons charges.

Bail for the men was set for amounts between $7,500 and $15,000 (euro6,300 to euro12,600).

The weapons charge carries a sentence of up to 15 years in prison.

Police said Medard, 30, a former Army soldier, was suspended from the force. Internal Affairs is investigating the incident.

Medard joined the force in July 2003 and was assigned to a precinct in the city's Queens borough.

At her Queens apartment, Kimberly Medard defended her husband.

"I guess the police believe their story, but I believe mine," she told the New York Daily News. "I believe him. I believe in him."

In court, Lauren Cardonsky, a prosecutor, said Dorsica admitted the men were on their way to carry out the violent plot. But Dorsica's lawyer, James E. Toner, said his client hadn't confessed to anything.

Copyright 2015 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.