Former Miami-Dade police Sgt. Allen Cockfield was cleared of charges that he intentionally killed his K-9 partner in 2006.

Jurors on Friday cleared former Miami-Dade police Sgt. Allen Cockfield of animal cruelty in the June 2006 death of his former partner, a rookie police dog named Duke.

When the verdict was read about 4 p.m. inside the packed courtroom, police supporters gasped loudly. Some wept.

Cockfield smiled broadly and embraced relatives. When he walked from the courtroom, fellow officers in the hall erupted into applause.

“He should have never ever been charged,” said defense attorney Douglas Hartman. “They put this guy through four years of hell.”

Cockfield, a longtime officer who was fired after his 2007 arrest, expects to get his job back, Hartman said. Cockfield declined to talk to reporters afterward.

Friday’s verdict was not wholly unexpected.

Cockfield, 55, was originally charged with misdemeanor animal cruelty and a felony count of a killing a police dog, which could have cost him his law enforcement certificate.

But Thursday, prosecutors conceded that they had not proved Cockfield intended to kill Duke when he kicked him during an ill-fated training session.

At Hartman’s request, Miami-Dade Circuit Judge Antonio Arzola tossed out the felony charge, but allowed the lesser count to stand.

Miami-Dade prosecutor Isis Perez said in closing arguments that Cockfield viciously and fatally kicked the Belgian Malinois during an “obedience control” session at the department’s training bureau.

Frustrated with Duke for barking and not obeying commands, she said, Cockfield lifted the dog up by his leash, choking him, and then delivered a series of swift kicks.

The dog yelped and died of a disruption to his heart rhythm, Perez said. She downplayed Hartman’s contention that Duke posed a threat to Cockfield. Several officers who testified against Cockfield did, too.

“Not one single witness who sat here said that Duke was attacking him,” Perez told jurors Friday.

But Hartman argued the case was a “freak training accident,” and that Cockfield was simply defending himself from an overaggressive, dangerous dog. His methods were standard training for K-9 officers, he said.

The six jurors deliberated for two hours before returning a verdict.

“The jurors have spoken and we respect their verdict,” Perez said afterward.

John Rivera, head of the PBA and a longtime critic of the Miami-Dade State Attorney’s Office, watched the trial with a contingent of union and other supporters.

“This was really sad, but yet it had a happy ending,” Rivera said.