Emerging details of the suspect’s history — he gave his second last name in court in Sacramento on Tuesday as Bracamontes, not Bracamonte — show that he crossed the southwest border at least twice in a wave of illegal immigration more than a decade ago, then used several aliases and stayed out of trouble just enough to elude detection as the Obama administration ramped up deportations in recent years and expanded systems to identify foreigners who committed crimes.

Under the name Marcelo Marquez, Mr. Monroy Bracamontes was arraigned Tuesday on 14 felony counts, including the murders of the two sheriff’s officers, theft of a sheriff’s vehicle and a shotgun, four carjackings and the attempted murders of three deputies and a civilian. The 13-page complaint, which the Sacramento judge read in its entirety, also lists special circumstances in the case against him, including killing an officer engaged in his duties and killing the officers to avoid arrest, which could allow prosecutors to seek the death penalty.

His wife, Janelle Marquez Monroy, who was with him throughout the shooting rampage but was captured first, was charged with murder in the killing of one deputy, with prosecutors saying she was an accomplice, and she faces other charges. She is a United States citizen, immigration officials confirmed.

During a brief news conference after the arraignment, the Sacramento County district attorney, Jan Scully, said she would not discuss whether prosecutors intended to seek the death penalty. She said that investigators had not determined whether Mr. Monroy Bracamontes was affiliated with a gang or a drug cartel, but that they were holding him in maximum security as a precaution.

Immigration and Customs Enforcement officials said Mr. Monroy Bracamontes was deported for the first time in 1997 after he was convicted in Arizona of narcotics dealing. He was arrested again in Arizona in May 2001 on drug and weapons charges, but those were dismissed, and that month he was deported for a second time.