Jeffrey Walker wept, pleaded for mercy, and apologized to Police Commissioner Charles Ramsey and all his fellow officers before sentence was handed down for the crimes he admitted to participating in while a member of the Narcotics Field Unit.

"I'd been messed up for so long -- but I wanted to do right in the end," Walker stammered as he wept, before a sentence of three-and-a-half years was handed down.

With more than two years of time served, Walker could be released from federal prison in less than eighteen months.

The six officers from that unit who Walker testified were deeply involved in criminal activity such as robbing and beating drug dealers were acquitted of all charges in May.

But U.S. District Judge Eduardo Robreno and federal prosecutors still called Walker a "credible" witness and said they believe he told the truth. That led Robreno to grant a "downward departure" from the standard punishment of 106 to 117 months on charges of attempted theft and unlawfully carrying a firearm.

Walker, who was arrested in May 2013 after he tried to plant drugs on a person he believed was a drug dealer but wound up being an undercover FBI agent and then agreed to testify against his fellow officers, was credited with breaking "an institutional code of silence in the Philadelphia Police Department," said prosecutor Anthony Wzorek.

Walker called his arrest "a turning point."

"Once I was arrested, that's when I really began to suffer. I discovered what I had been doing to myself for years, the seriousness of my crimes, the pain inflicted on my victims," he said.

"I told because I was part of something that wasn't right, that had been going on for years, hidden, protected. It had to stop," he said of his decision to testify for federal prosecutors. 

Judge Robreno called the jury's acquittal of officers Thomas Liciardelo, Perry Betts, Linwood Norman, Michael Spicer, John Speiser and Brian Reynolds the "right" verdict, stating the government "failed to meet its burden" of proving guilt beyond a reasonable doubt.

However, he said Walker's testimony was credible and shined a light on the Narotics Field Unit, specifically the difficulty of the job and the temptations it poses to officers due to exposure to drugs and cash.

On the other hand, Robreno said the testimony of two supervisors from that unit, Sgt. Robert McCloskey and Lt. Robert Otto, was "not credible."

Those supervisors defended the accused officers, and pinned blame for all wrongdoing on Walker.

Robreno noted that despite signing off on positive performance reviews for Walker before his arrest, their views of Walker "conveniently changed," he said, as both on the stand criticized Walker as an unreliable officer.

Walker's defense lawyer Thomas Fitzpatrick noted that Walker has been separated from his daughter while incarcerated, and that his sister Karen died from cancer on the day of the acquittal in the trial.

"He not only testifed against drug dealers and bad guys ... he then testified against who we would like to think of as the good guys. There is no refuge for him," Fitzpatrick said. "Who does Jeffrey Walker call for help now?"

Walker's sentence includes two years of supervised release and a $5,000 fine.

The six accused cops were recently ordered re-hired by the police department by an arbitrator, and ordered to be paid $90,000 each.

Five of the six, who were named in a letter from the office of D.A. Seth Williams saying his office would not rely on them in court, recently filed a lawsuit against the city, Williams, and police commissioner Charles Ramsey.