A longtime Littleton police motorcycle officer is on unpaid leave after FBI agents said he purchased more than $1,300 worth of Ecstasy from a drug dealer who was working as a confidential informant.

Jeffrey Allan Johnston, a 22-year veteran, appeared in a federal courtroom Monday to face a string of charges, including drug possession with the intent to deliver and possession of a firearm in furtherance of a drug trafficking crime. Investigators found cocaine, steroids, hundreds of prescription pills, a scale and guns when they searched Johnston’s Parker home after his arrest on Friday, according to an affidavit filed in the case.

The informant told investigators he knew Johnston for two years and gave Ecstasy and other drugs to guests at Johnston’s house parties at least three times, the affidavit says.

Johnston, 46, called the informant on July 15 looking to buy 40 or 50 Ecstasy pills for $15 to $20 each, the affidavit says. FBI agents recorded the conversation. The two met Friday at Johnston’s house, where he was arrested. He was being held without bond pending a federal detention hearing on Thursday.

“If the allegations are true, it was limited to his private life, and there’s no connection whatsoever with the police department,” Littleton police Cmdr. Trent Cooper said, adding that Johnston, who worked for more than a decade in traffic enforcement and investigations, was an otherwise exemplary employee. Investigators notified the department of their probe late last week. “Everyone was just completely caught off guard. I’d like to think that if anyone had an inkling, they would have come forward.”

Harvey Steinberg, Johnston’s attorney, did not comment as he left the federal courthouse Monday.

Agents wrote in the affidavit that Johnston on Friday bought 37 pills and 6.3 grams of powder, and showed the informant how he filled caplets with the drug. It was unclear how the two initially met, but Cooper said he doubted it was through Johnston’s police work, which was limited to writing tickets and investigating crashes. Johnston was a member of a drug task force in the 1990s, Cooper said.

The department launched its own internal investigation as a matter of course.

“Cops are human, and humans make bad mistakes sometimes,” Cooper said. “When a police officer makes a mistake of this kind, he’s going to be held accountable. These are situations we take very seriously. Officers are not treated any different than anyone else when this happens.”