RIVERSIDE, Calif. — Just after dawn, a line of officers marched to the gate outside Fidel Delgado’s home here with guns drawn, one holding a rifle. Mr. Delgado emerged barechested from his home and with a look of confusion.

“¿Qué necesita?” he asked: What do you need?

About 20 minutes later and 10 miles away, Anselmo Morán Lucero sensed exactly why officers had come. He spotted them as he was returning from a night out, and turned his truck around. But an unmarked S.U.V. pulled in front of him and another flashed its lights behind him, blocking his escape.

They asked his name. They asked if he knew why he was being arrested. Mr. Lucero nodded.

Every day around the United States, from before sunrise until late into the night, people like Mr. Delgado and Mr. Lucero are being picked up by Immigration and Customs Enforcement officers, the front-line soldiers in President Trump’s crackdown on illegal immigration.

More than 65,000 people have been arrested by the agency since Mr. Trump took office, a nearly 40 percent increase over the same period last year and as sure a sign as any that the United States is a tougher place today to be an undocumented immigrant.

But I.C.E. is in some ways operating in enemy territory in California, home to more than two million undocumented immigrants and hostile to the idea of mass deportations. Because local law enforcement often will not turn over undocumented immigrants in their custody, I.C.E. must make most of their arrests at homes, at workplaces and out on the street, which is more complicated than simply picking people up from jails — and potentially more dangerous.

So when a team of immigration agents gathered at 4:30 on one already warm morning in June, their chief, David Marin, warned them to stay away from any sign of danger.

After going over notes on each of the men they were after, the team pulled out in their unmarked S.U.V.s. Eight hours later, five men would be in custody, awaiting the start of deportation proceedings.

The New York Times followed the team for a day as it navigated the streets and politics of Southern California, and spoke with some of the men it arrested and the families they may soon be leaving behind.

An Unplanned Arrest

As the sun crept above the horizon, the officers gathered on a hill just a few yards away from Mr. Delgado’s home. But it was not Mr. Delgado they had come for; it was his son Mariano.

Mariano Delgado, 24, had returned to Mexico in 2011 after he was convicted of drunken driving. Since illegally re-entering the United States, he has been arrested four times for assault with a deadly weapon.

Immigrants like him are called “criminal aliens,” and there are so many of them in Southern California that Mr. Marin says it is effectively impossible to go after anyone else. But under President Trump, agents are encouraged to also arrest undocumented immigrants without serious criminal records, a break from the Obama administration’s policy of mostly leaving those immigrants alone.

So here and across the country, agents now make more “collateral” arrests — undocumented people they come across while looking for someone else. That was about to happen.

When officers, guns out, approached the chain-link fence surrounding the home, the dogs began barking loudly, joining the squawking chickens. Fidel Delgado emerged.

The elder Mr. Delgado, 46, and his wife, María Rocha, told the officers that their son had moved to Texas months ago. They readily admitted to being in the country illegally, but added that they worked. Their youngest son, 16, is an American-born citizen. When the agents shook him out of bed, he began to sob.

After taking Mr. Delgado’s fingerprints, they ran them through a database. Within minutes, they learned that he had once crossed the border illegally, twice in the same day, and had been sent back to Mexico.

A couple of officers debated what to do: Should they take both parents and call Child Protective Services for the boy? Did they believe that Mariano Delgado was no longer living there, even though they thought he was home as recently as the week before?

“If he doesn’t give up the son, we’re going to take him,” one officer said.

They left the wife behind and led Mr. Delgado to a van, where he was soon shackled. The handcuffs would leave marks.

Later that morning, Ms. Rocha, 50, leaned against the chain-link fence that surrounds their home, bleary-eyed and in shock.

“My husband, they had no reason to take him,” she said. “They weren’t searching for him.”

The family has lived in the three-bedroom white house in a blue-collar, semirural enclave of Riverside for three years, paying $1,300 a month in rent. Ms. Rocha, who cleans offices in nearby Corona, a more upscale community, said she brought home about $1,200 a month. Her husband, who milks cows at a dairy, earns about $12 an hour.

The couple married in Mexico 24 years ago, just before heading north. “We came here for a better life,” she said. In all her years in the United States, she said, she had never had problems with “la migra,” as the immigration agency is known.

By the afternoon, Mr. Delgado had been released by the immigration agents, who decided that he was not a threat to public safety. He was given a notice that he must comply with any orders from immigration agents and returned to work the next day.

Agency Under a Microscope

Before heading out to their targets for the day, the I.C.E. team gathered in the darkness in the parking lot of a small hardware store. Mr. Marin, the enforcement supervisor, quizzed his officers:

What time will this man start to leave his home? Which way will that one turn when he pulls out of his driveway? When will the other one arrive back from his night shift?

The officers had been watching the men they were after for days, learning their habits so they could capture them easily.

Mr. Marin, 48, has worked in immigration enforcement for more than two decades, starting when the agency was called Immigration and Naturalization Services. In the 1990s, he said, officers would spend much of their time rounding up immigrants in front of home repair stores, routinely arresting people so many times that they would know them by sight. Within hours of a bus ride returning them to Mexico, Mr. Marin said, they would be on their way to the United States again.

Like roughly half of the other officers, Mr. Marin began his career in the military, serving as a Marine. He amassed tattoos the way others collect shot glasses: On his left forearm is the first letter of the word “Christian” written in Arabic, commemorating his work collecting intelligence on the Taliban in Pakistan.

Though he had to pass a basic Spanish course early in his career, today Mr. Marin hardly speaks a word of it. But many officers do. Nearly 40 percent of Mr. Marin’s officers are Latino, he said, and many of them hear refrains of “How can you do this to your own people?” They do not apologize.

But the agency is under a microscope here. Arrests in the Los Angeles region are up only 17 percent since Mr. Trump took office, far less than in the rest of the country, according to I.C.E. statistics.

Members of Congress and local officials routinely call Mr. Marin’s cellphone when they hear of arrests in their area.

“People want to know if we’ve gone into schools, if we’re standing in the market, but that’s not what we do,” Mr. Marin said, driving before dawn. “We know an arrest is a traumatic event for a family. We know the impact it has, and we take it very seriously.”

Luck Runs Out

While Mr. Delgado was being questioned, other members of the team were waiting for Mr. Lucero, who had already been deported once.

Mr. Lucero, 51, and his wife, Jamie, 47, arrived from a small village in the Mexican state of Puebla more than three decades ago. He had built a thriving landscaping business, tending to yards of homes in upscale Orange County.

In 2006, Mr. Lucero was convicted in a domestic violence case and spent several months in jail, then was deported. But he had reconciled with his wife and was eager to return to her and their six children, two of them born in the United States. So he crossed the border illegally again.

Immigration officials had tried to get the Orange County sheriff’s office to hold Mr. Lucero for them when he was in jail for a day on a new domestic violence charge in 2014. But the sheriff declined, according to I.C.E. Many California sheriff and police departments do not cooperate with immigration officials, saying it erodes trust in law enforcement among immigrant populations. Mr. Trump has threatened to punish these so-called sanctuary cities and counties, saying they harbor lawbreakers.

For several nights before the I.C.E. team showed up, Mr. Lucero said, he had dreams of immigration agents coming to get him. The night before, he and his wife tried their luck at a nearby casino, playing the slot machines until daybreak. They had won a couple of hundred dollars and left just before 6 a.m.

When they began driving home, Ms. Lucero’s brother, with whom the family lives, warned them that immigration officers were near. But Mr. Lucero was unable to evade them.

Hours after his arrest, Jamie Lucero, her eyes red with tears, pulled out a blue folder with Mr. Lucero’s papers neatly organized, including documents showing he had completed an anger-management program and followed the rules of probation from his domestic violence case. She was planning to take the folder with her when she visited him in detention, though the papers are unlikely to have a bearing on his new deportation case.

Their 29-year-old son, Urie, said that the week before, four officers had come to the door holding a picture of a bald man they said they were after. They never mentioned the man’s name, and Urie Lucero said he did not recognize the man.

But the officers came inside the home and looked around. The family is convinced that the visit and the picture of the bald man were ruses to try to scope out Anselmo Lucero’s whereabouts. “That’s how they are getting people,” Urie Lucero said.

Jamie Lucero said the officers had told her not to bother paying for a lawyer because he faced certain deportation.

By lunchtime, the agents had five immigrants in custody: three of their six targets of the day, as well as Mr. Delgado and another man they found in the home of a target. Typically, officers successfully arrest about half the people they are looking for, Mr. Marin said, so this was a good day.

“Criminals off the street, that’s our goal,” he said while standing inside the San Bernardino processing center, where immigrants from the region are taken each day.

The men they had arrested sat inside a small holding cell clutching their brown-bag lunch of a turkey sandwich and apple. Mr. Marin and one of his deputies headed for lunch at a small Mexican taqueria.