A man arrested on drug charges during a police operation in which one officer accidentally shot a colleague was the target of an undercover sting involving marijuana, according to court documents filed Tuesday.

The suspect had already been arrested outside a home in Odenton Monday afternoon when officers on a multi-jurisdictional task force raided the residence in the 100 block of Pinecove Ave. Police secured a female occupant, described as cooperative, and spread out through the house.

Authorities said a Baltimore County officer accidentally fired his gun, striking a city officer in the arm. On Tuesday, Anne Arundel County police said for the first time that the city officer returned fire with several shots, but did not hit anyone. The wounded officer was treated and released from Maryland Shock Trauma Center.

Police released few details of the shooting but court charging documents describe the drug sting in detail: