A federal jury has cleared six former Philadelphia drug squad officers in a corruption case that prompted scores of convictions to be overturned amid charges that the officers stole more than $400,000 in drug money, beat suspects and lied to win convictions.

The verdict on Thursday follows more than a month of testimony and a week of deliberations at the U.S. Courthouse in Philadelphia.

Lawyers for the veteran city officers strenuously attacked the credibility of a string of drug dealers and a disgraced former squad member who cooperated after being caught in an FBI sting.

Former officer Jeffrey Walker told jurors that he had committed "thousands" of crimes on duty during his years with the squad. He said he never worried about sending people to prison based on planted evidence or perjured testimony because he did not consider drug dealers "human."

The 26-count federal racketeering indictment, based largely on Walker's account, accused his former colleagues of planting evidence, roughing people up, and lying to win convictions.

"I was very loyal to the guys," Walker testified. "I would lie for them. I would steal for them. I would abuse people for them. I wanted to be part of the squad."

The defendants cleared Thursday are squad leader Thomas Liciardello, Brian Reynolds, Perry Betts, Michael Spicer, Linwood Norman and John Speiser.

Defense lawyers called Walker, a 24-year veteran, a lying thief and lone actor.

"When you're dirty and despicable and dumb and arrogant, it's easy to get you," lead defense lawyer Jack McMahon told jurors.

Many of the other government witnesses acknowledged selling drugs and one, a college graduate, said he made about $50,000 a month selling marijuana. He said he knew he might face arrest someday -- but did not expect to be threatened and leaned over a high-rise balcony in the process. He said the officers returned to his apartment after locking him up and stole a safe containing $80,000.

Assistant U.S. Attorney Maureen McCartney said the witnesses, whatever their criminal behavior, told jurors "shockingly similar things to what Jeffrey Walker had told them."

The criminal trial follows years of complaints and lawsuits about Licardello's undercover squad. About 160 convictions were overturned amid Walker's plea in 2013 and the racketeering indictment a year later.

Spicer was the only one to testify, telling jurors that Liciardello was an aggressive leader who sometimes bragged of making big arrests, but never crossed the line.

Defense lawyers argued that the squad did difficult, dangerous work and did it well. Some of the defense oratory in closing arguments brought family members in the courtroom, and at least one juror, to tears.