LOS ANGELES (Reuters) - Former Los Angeles County Sheriff Lee Baca pleaded guilty on Wednesday to lying to investigators in a federal corruption and civil rights probe that clouded the final years of his tenure as chief custodian of the nation’s largest county jail system.

Los Angeles County Sheriff Lee Baca waits to visit inmates in the Men's Central Jail following a news conference to address the Citizens' Commission on Jail Violence report on his department's management of the jail system in Los Angeles October 3, 2012. REUTERS/Jason Redmond/Files

Although the felony charge carries a maximum sentence of five years in prison, prosecutors agreed under Baca’s plea deal to seek a jail term of no more than six months, and a federal judge ordered probation officials to prepare a pre-sentencing report before deciding his punishment.

Baca’s plea makes him the 18th current or former member of the sheriff’s department convicted of criminal charges that stem from a federal investigation of inmate abuse and other wrongdoing, including cover-up attempts, at two downtown Los Angeles lockups.

Baca, 73, served as the top elected law enforcement official in Los Angeles for 15 years before retiring in January 2014.

He joined the sheriff’s department as a deputy in 1965 and was first elected in 1998 to lead the 10,000-member law enforcement agency that controls the Los Angeles County jail system, which houses an inmate population of about 18,000.

“Today’s charge and plea agreement demonstrate that illegal behavior within the sheriff’s department went to the very top of this organization,” U.S. Attorney Eileen Decker told a news conference announcing the plea agreement.

Baca pleaded guilty to a federal charge of making false statements to investigators in 2013 when he asserted he had no prior knowledge of efforts by his deputies to intimidate an FBI agent and thwart a criminal probe of his department.

Specifically, Baca admitted that he actually was aware that his deputies were going to contact the agent and that he had directed them to “do everything but put handcuffs” on her, according to his plea agreement, Decker said.

Baca, dressed in a brown suit, entered his plea during a 40-minute hearing. He said little during the proceedings except “Yes, your honor,” or “No, your honor” in reply to procedural questions from the judge.

Defense lawyer Michael Zweiback said Baca was allowed to remain free without bond because of his cooperation in plea proceedings and because he was deemed not to be a flight risk.

Zwieback said Baca will be interviewed by federal probation officials in about a month.

Decker said Baca could withdraw his guilty plea if the judge decides to impose a harsher penalty, in which case prosecutors would seek a federal indictment.