LOS ANGELES — Federal prosecutors on Monday charged 18 current and former members of the Los Angeles County Sheriff’s Department with excessive use of force and obstruction of justice as part of a sprawling investigation into allegations of misconduct and abuse of inmates in county jails, federal law enforcement officials said.

All but two of the officers, including two lieutenants, were arrested on Monday; the two deputies who were not arrested were apparently traveling, prosecutors said.

The officers all worked in the county’s jails in downtown Los Angeles.

The county’s jail system — the largest in the country and, according to many inmate advocates, the most troubled — has been under intense federal scrutiny for more than two years after a string of lawsuits accused deputies of abusing inmates.

One of four indictments returned Monday named seven officers who were supposed to monitor internal affairs. In the indictment, federal officials charged that two lieutenants tried to hide an inmate after they discovered that he was acting as an informant for the F.B.I.'s investigation.