U.S. immigration officials took aim at San Francisco’s sanctuary city law Monday in the case of the San Mateo man accused of being the “Rideshare Rapist.”

In a statement, the U.S. Immigration and Customs Enforcement agency said the city’s policy of not honoring ICE holds “shields criminal aliens who prey on the community.”

The suspect, Orlando Vilchez Lazo, 36, is being held in jail in San Francisco in lieu of $4.2 million bail and faces life in prison in connection with the rapes of four women who got into his car believing him to be a ride-hail driver, police said.

Immigration officials said Lazo was a “citizen of Peru illegally present in the U.S.” and that it had “lodged a detainer,” or hold, for Lazo on Friday with the San Francisco County Jail.

“ICE maintains that cooperation by local law enforcement is an indispensable component of promoting public safety,” the ICE statement said. “The San Francisco jail does not honor ICE detainers nor notify ICE about the impending release of aliens in its custody. In doing so, the jail not only provides a refuge for illegal aliens, but it also shields criminal aliens who prey on people in the community.”

The ICE statement referred to the San Francisco sanctuary and due-process ordinances that generally prohibit city employees from assisting ICE agents, limit notice to ICE about a person’s release from jail and prohibit cooperation with ICE holds.

Now Playing:

San Francisco immigration officials, in a statement from the Office of Civic Engagement and Immigrant Affairs, said that the sanctuary ordinance “promotes public trust and cooperation ... by making sure that all residents, regardless of immigration status, feel comfortable calling the police and fire departments during emergencies and cooperating with city agencies.”

Court records show that Lazo had no previous criminal record in San Francisco. ICE did not say whether it believed Lazo was a flight risk. He was formally charged Monday with four rapes and was scheduled to appear in court Tuesday afternoon.

The sanctuary city law became a national issue after the 2015 shooting death of Kate Steinle at a San Francisco pier.

The undocumented immigrant shooter, Jose Ines Garcia Zarate, had previously been released from San Francisco County Jail under the city’s sanctuary ordinance, even though immigration officers had asked that he be turned over for a sixth deportation.

Also on Monday, the Lyft ride-hailing service said that Lazo had been a Lyft driver but was no longer with the company.

Lazo “did drive for Lyft but, as soon as we were made aware of these ... allegations, we immediately deactivated him,” company spokeswoman Kate Margolis said.

The company said it had “no reason to believe” that the rapes occurred while Lazo was working as a Lyft driver.

Margolis did not say how long Lazo had been a Lyft driver or when he had been “deactivated” or why it believed the rapes did not occur while he worked for Lyft.

Police arrested Lazo on Thursday, five days after spotting a man in a South of Market neighborhood who matched the assailant’s description and obtaining a DNA sample from him. The sample linked Lazo to four rapes — one in 2013 and three this year, authorities said.

The four victims were picked up by what they thought was the ride-hailing vehicle they had requested outside bars and nightclubs, mostly in the South of Market area, only to be taken to another location and sexually assaulted, police said.

“These assaults were not date rapes. They were not acquaintance rapes. These assaults were violent rapes committed by a serial rapist — a sexual-deviant predator who was not going to stop until he was caught,” said Cmdr. Greg McEachern, who heads the Police Department’s investigations bureau.

Authorities said Lazo placed placards from ride-hailing companies inside his vehicle and deceived victims who mistook his car for one they ordered.

Steve Rubenstein is a San Francisco Chronicle staff writer. Email: srubenstein@sfchronicle.com