LOS ANGELES -- The former head of the nation's largest sheriff's department was the driving force behind a conspiracy to thwart a federal investigation into beatings by guards and other abuses at the Los Angeles County jail system he ran, a U.S. prosecutor told a federal jury Monday.

The conspiracy by ex-Sheriff Lee Baca and his aides deprived inmates who were beaten of justice and allowed deputies to escape accountability, Assistant U.S. Attorney Brandon Fox said in his closing argument.

"This was Mr. Baca's conspiracy," Fox said. "This was dirty from the beginning."

The longtime lawman is charged with conspiracy and obstruction of justice for acts his subordinates carried out in August and September 2011 after his deputies discovered an inmate with a smuggled cellphone was an FBI informant using the device to document abuses.

Baca, 74, abruptly retired in 2014 after more than a dozen deputies were indicted. He is in the early stages of Alzheimer's, but that has not factored into his prosecution on charges that could carry a maximum of 15 years in prison if convicted.

His defence lawyer said prosecutors failed to prove he was part of an elaborate effort to hide the informant from the FBI and intimidate a rookie agent working on the investigation by threatening to arrest her.

Defence attorney Nathan Hochman said Baca was merely seeking information because federal authorities would not answer his questions and evidence did not connect him to the conspiracy to derail the grand jury investigation.

Hochman pointed to Baca's second-in-command, Paul Tanaka, as the ringleader. He displayed a log of 60 phone calls between Tanaka and co-conspirators, but said there was only one call between Baca and those people.

"If Sheriff Baca is the heartbeat, the driving force, the leader of this conspiracy, it should be flipped," Hochman said.

Tanaka was convicted of obstruction charges at an earlier trial and sentenced to five years in prison.

Baca had long denied any role in the efforts to undermine the FBI, though he had spoken publicly about resenting the agency's intrusion into his jails and said his department policed itself.

Andre Birotte Jr., who was U.S. attorney in Los Angeles at the time of the investigation, testified at trial that Baca, who was known for his cool demeanour, was outraged by the FBI probe.

Birotte, now a federal judge, said that when he told Baca the investigation would continue whether he liked it or not, Baca said he was the sheriff and they were his jails. Baca had declared he was willing to "gun up," or go to war with the FBI if need be, Birotte said.

Earlier this year, Baca pleaded guilty to a lesser charge of making false statements to federal authorities, but backed out of the plea deal after a judge rejected a sentence of no more than six months as too lenient. Prosecutors got him indicted on the more serious obstruction charges.

Jurors who began deliberating Monday were not told about that withdrawn plea.

Baca still faces a later trial on the lying charge. Judge Percy Anderson separated that case to allow testimony by an expert on dementia that was not relevant in the current case.

The corruption probe led to convictions of 20 members of Baca's department, including nine on obstruction-related charges.

Baca did not testify at trial. A pair of former LA County district attorneys took the stand as character witnesses for him, saying he had an above-board reputation as a lawman.

The character witnesses showed Baca had good friends, but that he did not seek their legal counsel before sending deputies to intimidate FBI agent Leah Tanner and threaten her with arrest, Fox said.

Hochman said Baca had taken measures to stop and prevent abuses in the jail and co-operated with investigators.

But Fox said Baca was aware of horrible beatings that were routinely probed by internal investigators and found unsubstantiated. He cited a documented account by a jail monitor who saw an inmate knocked unconscious and then shocked.

"Mr. Baca throughout offered lip service to his core values," Fox said.