A security guard at Cub Foods bartered with shoplifters to get prescription drugs, according to felony drug possession charges filed Friday in Hennepin County District Court.

An investigation found that Nicholas Craig Foster, 27, of Andover, swapped freedom for drugs from shoplifters, the complaint said. He would release suspects without charges "in exchange for" prescription pills, it said.

The Brooklyn Center grocery store, at 3245 County Rd. 10, had contracted Foster as a "loss prevention investigator" through the Twin City Lawmen security service.

According to the complaint:

In February, a confidential source reported Foster's activities to Brooklyn Center police, which led to the investigation. Detective Terry Olson, who led the sting, located others who confirmed the source's claim of under-the-table deals.

On Wednesday, an undercover officer armed with eight prescription pills planted himself in the store as a shoplifter. He gathered products and left without paying. Foster took the bait and handcuffed the undercover officer. He took him into an office, where he found and "closely examine[d]" the "stolen" hydrocodone, oxycontin and morphine pills, according to the complaint.

Foster told the undercover officer that he would release him with a trespass notice without charging him, and that he would deliver the contraband to police -- not standard practice for either Brooklyn Center police or Cub Foods, Olson said in the complaint.

After the officer was released, surveillance camera footage showed Foster fiddling with Post-its, a cigarette pack and the pills before telling his supervisor he had to leave early.

As Foster left the store, officers stopped him and found the pills in his backpack. Further investigation showed Foster apparently deleted the photo of the pills he took when he first approached the undercover officer, the complaint said.

If convicted, Foster faces up to 10 years in prison and a $20,000 maximum fine.

Katherine Lymn is a University of Minnesota student on assignment for Star Tribune.