Robert Hankard, center, leaves the downtown Baltimore federal courthouse July 28 after being sentenced to 30 months in prison.

Standing outside the federal courthouse moments after being sentenced to 30 months in prison, former Baltimore Police officer Robert Hankard said he had lost everything.

But Hankard said he continues to sleep well at night, confident in his belief that he was not a rogue cop but someone who got caught up in a broken department.

“I happened to work for a cruddy supervisor,” Hankard had said inside the courtroom to one of the victims. “Now I know what it’s like to be in a flawed justice system.”

Hankard went to trial on accusations that he supplied a BB gun in 2014 that was planted on a man who had been run over by a corrupt Baltimore Police sergeant, and that he lied to the FBI about it years later. He was also charged with falsifying search warrant affidavits in two other incidents.

He did not take the stand in his own defense.

A federal jury convicted him in April. On Thursday, U.S. District Court Judge Catherine Blake said she had “no reason to disagree” with the jury verdict and that there were “clear untruths” in paperwork Hankard had submitted.

“Mr. Hankard has not accepted responsibility in the face of quite strong evidence,” Blake said in handing down the sentence.

Her sentence was half of what federal prosecutors had asked for. Assistant U.S. Attorney Leo Wise said Hankard had “perverted the course of justice on not one but four occasions.”

“What 60 months tells the community is that we will stand up for the rights of all of our citizens,” Wise said. “We demand integrity [from law enforcement], and they will be held accountable.”

The case grew out of the Gun Trace Task Force corruption investigation, in which a squad of officers were found to be robbing people of cash and drugs, lying in court papers and stealing overtime pay. Members of the task force cooperated with law enforcement, leading to other investigations, including the 2014 planting of a BB gun on a man named Demetric Simon.

The FBI determined that Hankard’s supervisor, Keith Gladstone, had planted the weapon, and Hankard told the grand jury that Gladstone had asked if he had a BB gun that he could pick up. Hankard testified that he did not.

Gladstone was subsequently charged in the case, and told the FBI that he got the gun from Hankard. Another detective, Carmine Vignola, had backed Hankard’s account, but was charged with lying to a grand jury and testified at Hankard’s trial that the gun was indeed picked up from Hankard.

Gladstone, who outlined years of crimes under a prosecution agreement, received 21 months in federal prison after helping bring down four other officers. Vignola received 18 months for lying to the grand jury.

As authorities continued to scrutinize Hankard, they found two instances where he had conducted unlawful searches. In one, prosecutors said he entered an apartment without a warrant; in another, officers entered a motel without a warrant, found drugs, and planted them in a vehicle outside to justify a search of the motel room.

“It turns the Fourth Amendment on its head,” Wise said Thursday.

Hankard addressed Simon in the courtroom, apologizing for “what my coworkers have done to you.”

He also spoke to Simon during a break in the hearing as well, asserting that he had a good reputation on the streets and that he wanted to keep in touch with Simon.

Simon is suing Hankard and other officers involved in the BB gun planting.

Among those who asked Blake for leniency in sentencing Hankard was a man named Norman Johnson, who said he had spent half his life in prison. Hankard forged a relationship with Johnson at a catering company they’ve been working for.

“No one ever cared about me,” Johnson told Blake. “Mr. Rob cares about people. He cares about me.”

He asked that Blake sentence him instead, saying Hankard could “continue to help people like me stay out of trouble.”

Johnson said he was wrongly convicted of rape in the 1970s. Asked if he ever thought he would be standing up for a police officer accused of misconduct, Johnson replied: “I know all cops are not bad.”

Read more: