A federal judge repeatedly rebuked former Los Angeles Sheriff Lee Baca for bringing shame on his department as he sentenced him Friday to three years in prison for obstructing an FBI investigation into abuses at the jails he ran.

In exceeding the two-year sentence prosecutors recommended, U.S. District Court Judge Percy Anderson said Baca's fall was tragic, but it was his own doing and that his role atop a corrupt department where deputies brutalized inmates had ruined lives and done lasting damage.

"Your actions are an embarrassment to the thousands of men and women who put their lives on the line every day," Anderson told the longtime lawman. "Blind obedience to a corrupt culture has serious consequences."

Baca was the final and most prominent defendant in a case that blossomed from a civil rights investigation of beatings by guards in the nation's largest jail system into a broader corruption scandal that led to the top of the department. In addition to Baca and his top lieutenant, 19 others were convicted of crimes ranging from assaults to obstructing justice.

Anderson said he would have sentenced Baca to five years in prison except for his nearly half-century of public service and because he's in the early stages of Alzheimer's disease. The judge, however, took exception to a defense contention that Alzheimer's is a sentence of its own.

"As awful as Alzheimer's disease is, it's not a criminal penalty," said Anderson, who said the suggestion was an insult to millions of others suffering from the condition who have not committed federal crimes. "Alzheimer's disease is not a get-out-of-jail card."

The sentence was a blow to the 74-year-old, who had been seeking probation and home confinement.

Baca, dressed in a light blue suit, delivered a scattered address from hand-written notes outside the courthouse after the sentencing in which he thanked the people of Los Angeles, his lawyers and his wife standing by his side, who he couldn't immediately locate.

He declined to comment on the sentence, but as he waited to cross a street, he said he was a man of faith who believed life was precious.

"I love life no matter where I am," Baca said.

He was ordered to surrender to federal prison authorities July 25. He was convicted in March of obstructing justice, conspiring to obstruct justice and lying to federal authorities.

Baca abruptly resigned in 2014 after underlings were charged with plotting to hide an inmate informant from his FBI handler. Deputies had discovered the inmate was a snitch after finding a contraband cellphone the informant was supposed to use to communicate with his handler.

The crimes tarnished Baca's reputation as a soft-spoken, rail-thin, Zen-like reformer who promoted education and rehabilitation behind bars and preached tolerance and understanding between people of different cultures and faiths.

Furious about the learning his department was under investigation, he told the local FBI head and top federal prosecutor he was ready to "gun up" for battle with them and stated: "I'm the goddamn sheriff, these are my goddamn jails."

"Rather than stop the abuses in the jails, he entered into a conspiracy with his subordinates to obstruct a federal civil rights investigation to protect his legacy," acting U.S. Attorney Sandra Brown said. "He made a decision to protect what he called his empire, his jails and then simply to protect himself."

Defense attorney Nathan Hochman said Baca's misdeeds over six weeks in 2011 and four false answers to 400 questions during a voluntary interview with authorities in 2013 must be weighed against an "extraordinary record of public service" over 48 years and along with his condition, which has progressed from mild cognitive impairment to mild dementia.

More than 200 friends and supporters wrote letters of support for Baca, including former Mexican President Vicente Fox, former Govs. Arnold Schwarzenegger and Gray Davis, former Los Angeles Ram-turned-minister Rosey Grier, former Dodgers manager Tommy Lasorda, Hollywood executives, clergy and former jail inmates.

"For 48 years, he served the people of Los Angeles with all his might, with all his heart," his attorney, Nathan Hochman, said.

Baca plans to appeal, challenging several of Anderson's rulings that Hochman said prevented a fair trial, including a decision not to allow medical experts to testify whether Baca's medical condition impaired his memory when he lied to federal authorities.