Two officers from the Los Angeles Police Department have been charged with repeatedly sexually assaulting four women over the course of more than two years, prosecutors said on Wednesday.

The officers, James Nichols, 44, and Luis Valenzuela, 43, were each charged with multiple counts of sexual assault, including rape, according to a statement from the office of the Los Angeles County district attorney, Jackie Lacey, on Wednesday.

Prosecutors also charged Mr. Valenzuela with one count of assault with a firearm, accusing him of pointing a gun at one of the victims. The criminal complaint said most of the assaults happened while the officers were on duty and armed and that some took place inside a police vehicle.

The officers are scheduled to be arraigned on Thursday, and prosecutors said they would ask that bail be set at more than $3.8 million for Mr. Nichols and more than $3.7 million for Mr. Valenzuela. If convicted, both men face a sentence of life in prison.