NEW YORK (CBSNewYork) — Police have taken into custody a man they say struggled with a federal agent and tried to take his gun.

Police had been searching for Ricardo Ruiz-Rosado for five hours before tracking him down, CBS2’s Valerie Castro reported.

A Drug Enforcement Administration agent was trying to arrest Ruiz-Rosado around noon Tuesday in the parking lot of a Hampton Inn in South Jamaica on 135th Avenue near JFK Airport.

NYPD officers search for a suspect after a struggle for a DEA agent's gun in Queens on Nov. 3, 2015. (credit: CBS2)

NYPD officers search for a suspect after a struggle for a DEA agent’s gun in Queens on Nov. 3, 2015. (credit: CBS2)

One shot was fired, but no one was hit. The agent recovered the weapon.

The suspect ran off, and police swarmed the area. Ruiz-Rosado was found hiding in a shed, cops said.

Police also arrested a woman earlier Tuesday in connection with the case. They have not released her name.