Two years ago, Ricky M. Allen Sr. led an effort to improve the Buffalo Police Department.

Today, he’s a convicted drug dealer.

Allen, former interim chairman of the Buffalo Joint Commission to Examine Police Reorganization, pleaded guilty Wednesday to conspiracy to distribute cocaine. He faces up to 46 months in federal prison.

“When we get a drug dealer off the streets, it’s a good thing,” said Buffalo Police Commissioner Daniel Derenda. “When we get a drug dealer who’s masquerading as a community leader off the streets, it’s an even better thing.”

Allen’s fall from grace started with his arrest in March 2011 and the allegation that he used his position on the police panel to obtain inside information about drug investigations.

Police said Allen would then pass the information on to John C. Smith, a longtime friend and the man charged with heading the drug ring. They also claim Allen allowed Smith to store cocaine in Allen’s home on Roosevelt Avenue.

“The defendant’s residence was a stash location for Smith,” Assistant U.S. Attorney Thomas S. Duszkiewicz said in court Wednesday.

Allen, 56, admitted his involvement with drug dealing as part of a plea deal that details three separate incidents of Allen helping Smith sell cocaine. Duszkiewicz said there were other such incidents.

“What possessed you to get involved in something like this?” U.S. District Judge Richard J. Arcara asked Allen.

Allen, who suffers from back pain and other ailments and is permanently disabled, said his involvement with Smith started out as a well-intentioned effort to help his friend of 28 years.

“I was trying to get him to straighten his life out,” he told Arcara.

Allen never explained how his effort at helping a friend led him to drug dealing, but his lawyer was quick to suggest that it was a bump in the road in an otherwise law-abiding life.

Married with three children, Allen spent 35 years as a manager at Moog Inc. before getting injured and becoming disabled.

“Suffice it to say it was a series of bad circumstances,” said defense attorney Jeremy D. Schwartz. “He made some bad decisions.”

At the time of his arrest, Allen was portrayed by police as an insider who abused his advisory position with the department.

Derenda said he was so upset by Allen’s involvement with Smith that he accompanied members of a SWAT team when they arrested Allen at his home that day in March 2011.

“He was a total fraud,” Derenda said, “and he’s getting what he deserved.”

There’s no mention in Allen’s plea agreement of his passing inside information on to Smith, but the allegation is spelled out in the original complaint against him.

At the time, prosecutors claimed that Derenda had informed the police commission at a meeting in February 2011 that “something big” was planned for the following week.

Allen, according to court papers, made a call to Smith the next day and had the following conversation with him:

“Something big going down next week, man,” he told Smith. “I have to talk to you about it.”

“Yeah, all right,” Smith responded.

A few weeks later, agents from the U.S. Drug Enforcement Administration arrested Allen, Smith and several others as part of an early-morning raid that included members of the Afro Dogs motorcycle club.

Allen, who will be sentenced July 17, was not the only high-profile person picked up as part of the roundup.