Twice since last October, Juan Antonio Velazquez was arrested and booked into the Lodi jail.
Each time, he stayed in the city jail until he was arraigned in court and released from custody because the charges were not serious enough to keep him in custody, especially since the county jail is overcrowded.
It took until his third arrest - on a homicide case - for Lodi police to learn that Velazquez had entered the United States illegally.
The Lodi Police Department will soon have a policy in place to avoid such things, and immigration checks will fall to jailers once they receive training this spring.
Velazquez previously fell through the cracks because officers book suspects at the jail, while dispatcher/jailers lock them up. Nobody had really thought about checking each arrested person's immigration status, or who should make such checks.
"This was something that was never part of jailers' and officers' training," Officer Dale Eubanks said. "Typically the police officer arrests someone for a crime, gets them in custody and then goes on to the next call."
And it is not as easy as asking someone for a birth certificate when they are arrested - after all, who carries birth records with them?
For that matter, if someone lies to police, officers might have strong suspicions, but they have no way of confirming whether it is the truth until taking fingerprints and running them through databases. If the suspect recently entered the country, that search might not turn up any results, anyway.
In the case of Velazquez, he was booked into the city jail, taken to court and then released from custody on his promise to appear at future court appearances - which he did.
The department screens inmates in all federal and state prisons, and in about 10 percent of the country's 3,100 jails.
Under the Criminal Alien Program, teams of agents are being sent across the country to handle requests from local law enforcement agencies. Almost 100 teams are currently working, and another 30 teams will be sent out this fiscal year.
The San Francisco-area CAP teams identified almost 19,000 incarcerated illegal immigrants last year, and nearly 7,000 had criminal histories and were deported.
Source: U.S. Immigration and Customs
Both cases were dismissed in court, meaning that he never had to serve time in the county jail, where the system would have flagged him.
The immigration confirmation process itself is not hard, Eubanks said. If someone is suspected of being in the country illegally, a jailer or officer fills out a form and faxes it to Immigrations and Customs Enforcement. An agent calls within about 10 minutes and can even interview the suspect by phone, asking questions that have been perfected through training and experience.
In larger jails, such as the San Joaquin County Jail in French Camp, the process is basically automated. All booking information is entered in a computer system, which generates a list of all people born outside the United States, Deputy Les Garcia said. Immigration officials get that list and use it to determine which people should be interviewed and be placed on no-bail holds.
That is how it is done at the Sacramento County Jail, where on any given day at least 20 to 30 people are being housed solely on immigration holds, Sgt. Tim Curran said.
Some large departments have received special monthlong training from ICE, through section 287g of the Immigration and Nationality Act. The process basically deputizes local officers as immigration agents, and they can actually start deportation proceedings.
It is not something ICE recommends for smaller departments such as Lodi's, Lodi Police Capt. Gary Benincasa said, partly because it would stretch existing police resources. Additionally, ICE agents are easily accessible so officers can contact them with little trouble.
The training also comes with its own drawbacks, because it turns law enforcement officers into immigration agents. Even the much larger Sacramento County Sheriff's Department is not interested in such training, Curran said.
Not only does it raise issues of racial profiling allegations - which can be costly legal battles - but it can work against police who are trying to solve and prevent crimes.
"We're here to help everyone who needs us," said Sgt. Gerald Stoffel of the Galt Police Department, which books people into the Sacramento County jail and lets jailers handle immigration matters.
"If they're witnesses, we don't want them running away. We want to build their trust," Stoffel added.
He, like Lodi officials, remembers a time when officers did enforce immigration laws merely by contacting people on the street, detaining them and referring them to border patrol agents.
But laws changed, racial profiling lawsuits increased and immigration officials could not keep up with the number of referrals, Lodi Police Chief David Main said.
In December, Lodi police employees began talking about a way to improve immigration checks. One general consensus, Main said, was that officers should enforce state and local laws and leave federal laws to those employees.
They also wanted to meet with immigration officials to get their advice so the process would run smoothly. ICE, in turn, recommended that jailers be trained to handle the process.
Jailers will not be immigration agents, but the training will help them ask proper questions, know who to call and also reassure ICE that the calls are legitimate. That training had to be rescheduled but should be done in about a month, Main said.