LOS ANGELES — A former captain with the nation's largest sheriff's department pleaded guilty Wednesday to lying on the witness stand during a widespread misconduct investigation into abuse within the Los Angeles County jail system.

Tom Carey, a former captain in the internal investigations bureau of the Los Angeles County Sheriff's Department, pleaded guilty in federal court to making false declarations after reaching an agreement with prosecutors last week.

In exchange, prosecutors agreed to drop charges of conspiracy and obstruction of justice.

Carey, 57, could face up to five years in prison when he's sentenced Jan. 25. His attorney, Andrew Stolper, declined to comment.

Carey's plea agreement includes a stipulation that he must testify in related court proceedings if prosecutors call on him. That could lead to Carey testifying against former Undersheriff Paul Tanaka at his trial in November.

Carey and Tanaka were accused of hiding an FBI jailhouse informant to impede the FBI's investigation into abuse by guards. Tanaka has pleaded not guilty.

With Carey's guilty plea, 15 members of the Sheriff's Department have been convicted of federal crimes including beating inmates, obstructing justice, bribery and conspiracy. The convictions stem from a grand jury investigation that began in 2010 into allegations of abuse and corruption at the downtown Men's Central Jail.

Prosecutors say deputies tried to hide an FBI jail informant from his handlers for two weeks in 2011 by shifting him from cell to cell at various jails under different names and altering jail computer records. The FBI wanted the informant to testify to a grand jury.

Tanaka retired from the department in 2013. He had run to replace former Sheriff Lee Baca but lost by a wide margin to Jim McDonnell.

In a trial of multiple deputies, Tanaka testified for the defense that he was barely involved and was following Baca's orders that he thought were lawful. Those statements are expected to be used against him at his own trial.

Baca resigned as the corruption scandal engulfed his department. He has not been named as a target in the investigation.

Follow Amanda Lee Myers at https://twitter.com/AmandaLeeAP .