Six one-time Los Angeles Sheriff's deputies were sentenced Tuesday to at least two years in prison for conspiracy and obstruction of justice in connection with an FBI investigation into beatings and corruption in the downtown jails.

“You broke the vow you made to protect the public, to protect the community,” U.S. District Court Judge Percy Anderson said during the nearly three-hour hearing. “You didn’t serve the public by concealing what was happening in the jails.”

Their sentences ranged from 21- to 41-months - less than the 28- to 60-months in federal prison the U.S. Attorney's Office has asked for in court papers.

Even after their conviction and sentencing, the defendants maintained they were just doing their jobs.

“I thought were following lawful orders," former sheriff's deputy Gregory Thompson said as he quickly left the U.S. District courthouse in downtown Los Angeles after the hearing.

The crimes took place in August 2011, when a group of deputies discovered a cellular phone in the cell of inmate Anthony Brown, and traced the call history to the FBI's civil rights division. They questioned Brown, who admitted to working as an informant for the FBI - and that his phone had been part of a sting that led to the arrest of a deputy who'd smuggled it in for cash.

The deputies then hid Brown, moving him from jail to jail under fake names, fudging records to make it look like he'd been released.

Criminal defense attorney Peter Johnson, who represented former sheriff's deputy Stephen Leavins, said his client got orders directly from former L.A. Sheriff Lee Baca.

“Disobeying these orders would have been insubordination,” Johnson said.

Prosecutors declined to answer questions Tuesday about why higher ranking officials have not been prosecuted.

Officials have said former undersheriff Paul Tanaka, who is running for L.A. Sheriff in November, has been under investigation as part of the probe.

On Tuesday, Anderson sentenced Thompson to 37 months in prison; Leavins to 41 months in prison; Gerard Smith to 21 months; Mikey Manzo to 24 months; Scott Craig to 33 months and Maricela Long to 24 months in prison. They had been convicted in July.

None of them are on active duty.

Smith is on approved leave from the Sheriff's Department and Manzo, Long and Sexton are also relieved of duty - without pay. Thompson, Leavins and Craig are no longer with the department.

Anderson said he hoped other deputies and police officers who might find themselves in similar positions will learn from this case.

"No person, whether he wears a badge or not, is above the law,” he said.

But he did allow the deputies to spend one last holiday season with their families before being locked up. He ordered them to turn themselves in Jan. 2.

A seventh deputy - James Sexton- is awaiting sentencing. He was tried separately. His first trial ended in a hung jury in May. At a retrial this month, he was convicted of obstruction of justice and conspiracy.

Sexton's attorneys also argued he'd been following orders from higher ups in the department to keep Brown safe and isolated while the sheriff's department investigated the FBI for introducing contraband into the jail. Prosecutors have not said what punishment they’ll seek against Sexton.

Correction: An earlier version of this story said Scott Craig was on approved leave from the Sheriff's Department and Gerard Smith was no longer with the department. In fact, the reverse is true: Smith is on approved leave and Craig is no longer with the department. KPCC regrets the error.

This story has been updated.