A former Montgomery County deputy sheriff was sentenced Tuesday to 15 years in federal prison for shipping deadly quantities of fentanyl across the world on behalf of a Chinese drug trafficking organization.

David Landis, 44, had pleaded guilty in 2018 to charges relating to his startling downfall, which began when he bought bath salts on the internet to help him sleep, and ended with his agreement to repackage and ship synthetic narcotics from a Roxborough U-Haul storage facility in order to receive his own drugs at discounted rates.

Prosecutors said Landis did so at the behest of three Chinese dealers — Deyao Chen, Guichun Chen, and Liangtu Pan — who were also charged in the case but have not been extradited to the United States.

Acting U.S. Attorney Jennifer Arbittier Williams described the crime as a “travesty,” in part because Landis had served as a deputy sheriff in Montgomery County before he became ensnared in the distribution scheme. Prosecutors said that in 2016 and 2017 Landis sent 2,900 packages of narcotics to users in 21 states and 19 countries. And several of those people fatally overdosed using the drugs he sent them, Williams said.

Landis’ attorney, Kenneth A. Young, said Tuesday that Landis had grown addicted to the substances he’d been ordering online and felt he needed a way to finance his expensive habit. Court documents said Landis was paid in bitcoin or narcotics for repackaging and shipping the drugs, and that he communicated with his Chinese counterparts via email about where and to whom those shipments should go.

Landis “started buying these compounds and after he was a customer for awhile, he got sucked into this organization,” Young said. “This was a terrible organization from China that really destroyed a lot of good peoples’ lives.”

Landis has since become sober in prison, Young said, has accepted responsibility for his actions, and told U.S. District Judge Gerlad J. Pappert on Tuesday of his remorse for what he did.

Much of the case remains sealed in court dockets, preventing Young or prosecutors from saying whether Landis had agreed to cooperate against his accused co-conspirators.

Young said Landis “has done everything he could to ask forgiveness,” and that he hopes to continue helping people avoid making similar mistakes.