A former Philadelphia police officer received a 15-year sentence Wednesday for tipping off his drug-dealing half-brother about law enforcement efforts to bring him down, and later lying to FBI agents about it.

The punishment, imposed by U.S. District Judge Paul S. Diamond, exceeded federal sentencing guideline by more than two years and surpassed even the sentence sought by federal prosecutors.

It came after a hearing that lasted nearly three hours and was high on emotion, one that left 53-year-old Rafael Cordero weeping and one of the city's most outspoken defense lawyers shocked into stunned silence.

"Your client," Diamond said, addressing Cordero's lawyer, Jack McMahon Jr., during one tense exchange, "stands convicted not of protecting his brother, but helping a rather large-scale drug trafficker who was killing the very city he was sworn to protect."

Afterward, McMahon paced the hallways of the Philadelphia federal courthouse, saying, "This is unspeakably cruel."

Diamond left the bench twice during the hearing and ordered the lawyer to calm down.

"This is like Iraq or something," McMahon snapped after the judge had left the room.

Later, the lawyer, who has known Cordero for years from interactions at trials where they served on opposite sides, said, "What Mr. Cordero did for the prosecution and locking up of criminals in this city - he was probably one of the best."

At issue were two very different depictions at the man at the center of the case.

In December, a federal jury convicted Cordero, a 23-year veteran of the department and a married father of two young adults, on four counts of lying to FBI agents and obstructing justice.

FBI agents arrested him in August 2012, more than a year after authorities discovered his family bond with David Garcia, a top operator in one of Kensington's largest heroin distribution rings.

Cordero tipped off his brother when agents with the U.S. Drug Enforcement Administration installed a camera to monitor activity outside the group's primary hub, a warehouse off Kensington Avenue. Later, when agents raided the building, Cordero showed up within minutes to peek through windows and report back to Garcia.

At his trial, Cordero accused the agents testifying against him of lying.

On Wednesday, Diamond likened prosecutors' attempts to wring truth out of Cordero during that stint on the stand to watching someone try to "nail butter to a tree."

"This is a man who at every stage of this case has been deceptive, has been defiant, has been duplicitous," prosecutor Kevin R. Brenner said.

McMahon described that portrayal of his client as "disingenuous."

For years, Garcia worked as an FBI informant and often talked with Cordero about his work. Both brothers were unaware that by 2011, agents had dropped Garcia from their roster of trusted moles upon learning he was still working a drug corner at Swanson and Somerset Streets, McMahon said.

And as a decorated officer, with a long record of community and charitable work, and a strong family bond, Cordero should be given the benefit of the doubt, the lawyer said.

Cordero barely held his emotions in check through much of Wednesday's hearing. As neighbors, family members, and even a fellow officer rose to vouch for his character, he rocked back and forth in his chair, alternating between sobs and choked expressions of love.

When it was his turn to address the judge, Cordero described his crimes as a mistake stemming from seeing Garcia "as my brother and not seeing him as a drug dealer."

Turning to Cordero's family, Diamond responded: "This didn't happen because your father made a mistake. This happened because your father committed crimes and helped a drug dealer. This happened because your father let you down."