Bribes and shakedowns. Days in hideaways without food. For many fleeing violence in Central America, this is what thousands of dollars gets them on the journey to the United States.

MATAMOROS, Mexico — Shortly before dawn one Sunday last August, a driver in an S.U.V. picked up Christopher Cruz at a stash house in this border city near the Gulf of Mexico. The 22-year-old from El Salvador was glad to leave the one-story building, where smugglers kept bundles of cocaine and marijuana alongside their human cargo, but he was anxious about what lay ahead.

The driver deposited Mr. Cruz at an illegal crossing point on the edge of the Rio Grande. A smuggler took a smartphone photograph to confirm his identity and sent it using WhatsApp to a driver waiting to pick him up on the other side of the frontier when — if — he made it across.

The nearly 2,000-mile trip had already cost Mr. Cruz’s family more than $6,000 and brought him within sight of Brownsville, Tex. The remaining 500 miles to Houston — terrain prowled by the United States Border Patrol as well as the state and local police — would set them back another $6,500.

It was an almost inconceivable amount of money for someone who earned just a few dollars a day picking coffee beans back home. But he wasn’t weighing the benefits of a higher-paying job. He was fleeing violence and what he said was near-certain death at the hands of local gangs.

“There’s no other option,” Mr. Cruz said. “The first thought I had was, ‘I just need to get out of here at whatever cost.’”

As Christopher Cruz made his way to the American border, his smugglers sometimes identified him by a numeric code or an assumed name, or simply called him “the package.” Christopher Lee for The New York Times

The stretch of southwest border where he intended to cross has become the epicenter of the raging battle over the Trump administration’s immigration crackdown. One clear consequence of the tightening American border and the growing perils getting there is that more and more desperate families are turning to increasingly sophisticated smuggling operations to get relatives into the United States.

Mr. Cruz’s story provides an unusually detailed anatomy of the price of the journey. The money paid for a network of drivers who concealed him in tractor-trailers and minibuses, a series of houses where he hid out, handlers tied to criminal organizations who arranged his passage, and bribes for Mexican police officers to look the other way as he passed.

Even with his family’s payment, he slept amid filth and vermin. He watched guides abandon some migrants who could not keep up, and guards prod others to become drug mules. Sometimes the smugglers identified him by a numeric code, other times by an assumed name. But as often as not, they simply called him “the package,” to be moved for profit like an illicit good.

For Mr. Cruz, it was worth it. “They can build as many walls as they want,” he said, referring to American officials. “They can send as many soldiers to the border as they want, but a people’s need and desire for a better life is stronger.”

President Trump and his supporters have called for greater vigilance along the border to keep out people like Mr. Cruz, a low-skilled worker who followed in the path of other family members who also arrived illegally, and who hopes those left behind will join him.

Pledging to halt illegal immigration, Mr. Trump has pushed for a 1,000-mile wall, ordered National Guard units to the border and encouraged workplace roundups of undocumented immigrants, which had largely been curtailed during the Obama years.

The number of illegal crossings has dropped significantly in the last decade, but responding to a surge in recent months of Central Americans arriving at the southern border or sneaking across it, the administration has embraced even tougher measures: “zero tolerance” for those arriving illegally, by requiring criminal prosecutions; family separation, a policy from which Mr. Trump was forced to retreat after images of children wailing for their parents provoked a public outcry; and eliminating domestic violence and gang violence as grounds for granting asylum to migrants who arrived at legal crossing points.

“The zero-tolerance policy and the publicity surrounding the child separations will further strengthen the smuggling networks and reinforce the patterns we have observed, as the risks, costs and fees are significantly growing,” said Guadalupe Correa-Cabrera, a professor at George Mason University and an expert on organized crime. “This will certainly increase the demand for smugglers and will further strengthen the connection between human smugglers and other criminal actors, such as drug cartels and corrupt local law enforcement.”

The homeland security secretary, Kirstjen Nielsen, told lawmakers in May that migrants paid $500 million a year to groups fueling violence and instability in the region. A decade ago, Mexicans and Central Americans paid between $1,000 and $3,000 for clandestine passage into the United States. Now they hand over up to $9,200 for the same journey, the Department of Homeland Security reported last year. Those figures have continued to rise, according to interviews at migrant shelters in Mexico.

To trace Mr. Cruz’s journey from El Salvador, The New York Times relied on extensive interviews with him and his family, and reviewed contemporaneous photographs, text messages, receipts and GPS positions.

UNITED STATES Houston San Antonio TEXAS $6,500 MEXICO McAllen Monterrey Amounts show the payments that Mr. Cruz’s family made at each stage of his trip. Matamoros $180 $2,800 TAMAULIPAS Mr. Cruz’s route SAN LUIS POTOSÍ Gulf of Mexico HIDALGO Guadalajara $450 Mexico City Puebla VERACRUZ $1,900 Malpaso Dam CHIAPAS Pacific Ocean Guatemala City $800 GUATEMALA EL SALVADOR San Salvador San Diego U.S. — MEXICO BORDER El Paso UNITED STATES Houston San Antonio TEXAS $6,500 MEXICO McAllen Monterrey Amounts show the payments that Mr. Cruz’s family made at each stage of his trip. Matamoros $180 $2,800 TAMAULIPAS Mr. Cruz’s route SAN LUIS POTOSÍ Gulf of Mexico HIDALGO Guadalajara $450 Mexico City Puebla VERACRUZ $1,900 Malpaso Dam CHIAPAS Pacific Ocean Guatemala City $800 GUATEMALA EL SALVADOR San Salvador UNITED STATES Houston Mr. Cruz’s route MEXICO TEXAS $6,500 Monterrey Brownsville $2,800 Matamoros NUEVO LEON $180 TAMAULIPAS Amounts show the payments that Mr. Cruz’s family made at each stage of his trip. SAN LUIS POTOSÍ HIDALGO $450 Gulf of Mexico Mexico City Puebla VERACRUZ Malpaso Dam $1,900 CHIAPAS Pacific Ocean Guatemala City HONDURAS GUATEMALA San Salvador $800 EL SALVADOR UNITED STATES Houston MEXICO $6,500 Monterrey Matamoros $180 $2,800 Mr. Cruz’s route Amounts show the payments that Mr. Cruz’s family made at each stage of his trip. $450 Mexico City Gulf of Mexico Puebla $1,900 Malpaso Dam Guatemala City Pacific Ocean $800 San Salvador

His uncle in the United States checked in constantly by Facebook Messenger during his weeks on the road. He asked for proof-of-life selfies and confirmed his locations along the route using the Find My iPhone app before wiring money for each leg of the journey.

A screenshot Mr. Cruz’s uncle took as he tracked Mr. Cruz’s progress on the journey. A screenshot Mr. Cruz’s uncle took as he tracked Mr. Cruz’s progress on the journey. | Source:

The Times also interviewed dozens of experts, academics, and current and former law enforcement officials about the underground economy of human smuggling. Reporters reviewed more than 200 recent criminal complaints in smuggling cases along the southwest border, including those brought against drivers, stash-house operators, foot guides and migrants.

That day at the Rio Grande last summer, a guide prepared to lead Mr. Cruz and some two dozen other migrants to the far side of the river while three lookouts perched in trees, scanning the horizon for any hint of the Border Patrol.

When he arrived at the crossing, Mr. Cruz found that the river wasn’t wide, at most a few hundred feet, but the water was murky and full of debris. The smugglers had gathered the migrants at the water’s edge, with giant inflated inner tubes for those who couldn’t swim. They said the makeshift rafts were slower than swimming, so Mr. Cruz pulled off his skinny-leg khakis and T-shirt and paddled to the other side in his boxer shorts.

After climbing up the bank, his first tenuous toehold in the United States, he crouched, wet and shivering, in the brush and got dressed. Mr. Cruz’s face had lost much of its roundness as he had shed 30 pounds over a month of hard travel. A life of skateboarding, tinkering with computers and eating his grandmother’s cooking had not prepared him for the demands of the road.

The smugglers almost hadn’t let him cross, because they worried that his coughing fits from a respiratory infection might give the group away. But he had made it. The foot guide passed along the all-clear signal from the sentries in the trees, and the small crowd of migrants began to sprint toward the 18-foot steel security fence blocking their passage into the United States. That area of the border, which Mr. Trump wants to fortify with a new wall, was already among the stretches best defended by the Americans.

Mr. Cruz had climbed halfway up the fence when he heard a helicopter overhead and saw patrol cars converging. Agents grabbed those already over the fence and began to arrest them.

“When I saw that, I slid down and I ran back,” Mr. Cruz recalled. He dived again into the Rio Grande, his only hope to escape back to Mexico.

Under Fear of Death

Mr. Cruz grew up in San Miguel, the fourth-largest city in El Salvador. Gang violence is virtually endemic in the country, and Mr. Cruz dropped out of high school when the infamous MS-13 became too dangerous there. His family relocated to Berlín, about an hour’s drive away, which had less of a gang problem than the big cities.

Mr. Cruz’s mother lived in the United States, but he was much closer to her brother there, an uncle he considered a father figure and called “Papi.” Mr. Cruz lived with his grandmother and younger sister. He also had a 2-year-old son to provide for, though he and the boy’s mother had broken up.

In El Salvador, Mr. Cruz earned a few dollars a day picking coffee during harvest season. Fred Ramos for The New York Times

During coffee-picking season he rose at 4 in the morning, walked an hour to the farm where he worked, then plucked ripe red coffee cherries until dark. He usually earned $15 to $20 a week. Outside harvest season, Mr. Cruz painted murals and cleaned streets for the local government. He briefly worked as a bartender at a restaurant an hour’s bus ride away.

The police had all but declared open season on gang-age men, Mr. Cruz said, and he and his friends were harassed and beaten by the security forces. Meanwhile, gang members regularly threatened him and shook him down for money because they realized he received support from his uncle in the United States.

One night, Mr. Cruz and his friends were walking home when they noticed a blue Honda creeping behind them. When the young men started to run, the car accelerated, then followed Mr. Cruz as the group split up.

“I got to my house and it was locked,” he recalled. He considered climbing over the front gate but worried the men who were following him might kill his grandmother and sister too. Over his shoulder he saw the gang members draw guns as he fled across a soccer field before taking refuge in a nearby health clinic.

After that night, he resolved to leave. “That is the reality of El Salvador,” he said. “You are scared of both, the gangs and the police.” He did not consider trying to enter United States legally to seek asylum; even under the more lenient asylum policies a year ago only a fraction of gang-violence victims won that status.

Mr. Cruz had never gone farther than neighboring Honduras. But in some Central American cities, smuggling services to the United States are openly promoted on the streets, with hawkers luring customers the way agents at tourist destinations advertise sailing or snorkeling excursions. They take potential customers to a back room of a nearby store, where salesmen pitch them on a smuggling route. Some would-be migrants give up homes, cars, livestock and even farmland tilled by their families for generations and take on debt to pay the fees.

Mr. Cruz’s uncle, who now has legal status in the United States after arriving illegally years ago, spoke to a woman in his local Salvadoran community. She told him of smugglers who brought her three children over for a flat $20,000 fee after gang members back home killed her husband. The uncle used WhatsApp to contact a woman in Mexico representing the smuggling network, who became the point of contact throughout Mr. Cruz’s journey.

“Would it be possible to pick up my nephew as close as possible to the edge of San Salvador?” the uncle asked her in one message. “The boy is 22 years old but acts more like 12.” The uncle spoke on the condition of anonymity because he, like other relatives of unauthorized immigrants, feared he could be prosecuted for trafficking a family member.

Mr. Cruz worried about the trip. His best friend had made the same journey the year before only to be kidnapped near the American border and held for two months. His family paid $20,000 to free him, and he ended up back in El Salvador. And a female friend of Mr. Cruz had been raped by smugglers on the American side of the border, caught by the authorities and then deported.

His uncle assured him over Facebook Messenger that everything would be fine.

Don’t worry too much, the trip will be peaceful. That’s why I paid so much. These people have good contacts. Ok, but one always feels nervous and fearful. In a short time you’ll be here and things will be different.

Mr. Cruz’s aunt and uncle earned enough to advance him the money for the journey, but Mr. Cruz would have to pay them back. They wired $800 to El Salvador the day he set out on the initial leg of the trip. “Any opportunity you have to connect, send me a message with your location,” the uncle wrote.

“Activate Find My iPhone so you can find out my location from the iCloud,” Mr. Cruz answered. “That way you’ll know the route I’m taking.” Mr. Cruz set off for the United States with a backpack carrying three changes of clothes, deodorant, cookies and a charger for the iPhone 5 that would be his connection and lifeline.

‘You Already Know How Much This Is’

His trip began with an idling pickup truck outside a mall in Soyapango, on the edge of San Salvador. The smuggler who would accompany him through El Salvador and Guatemala sat behind the wheel.

Mr. Cruz crossed into Guatemala legally with his national identity card. Fred Ramos for The New York Times

MEX. Guatemala City HONDURAS La Hachadura GUATEMALA San Salvador EL SALVADOR Pacific Ocean

In the beginning, it was almost like being a tourist. Mr. Cruz crossed into Guatemala legally at La Hachadura, close to El Salvador’s Pacific coast, with his national identity card. He even received a printed receipt.

The driver left the pickup truck behind in El Salvador and chaperoned him by bus to the capital, Guatemala City. The two of them transferred buses and traveled a few hours further to Huehuetenango, in the western highlands, which serves as a jumping-off point for the Mexican border.

The bus terminal in Huehuetenango, a Guatemalan city that is often the last stop for migrants heading into Mexico. Fred Ramos for The New York Times

They spent a night in a cheap hotel and traveled the next day to La Mesilla along the Mexican frontier. Vendors under colorful umbrellas sold drinks and snacks at the crossing. A blue sign wished travelers a “feliz viaje,” or nice trip, above the gate separating the two countries.

To skirt the border police outpost, the smuggler directed Mr. Cruz to a nearby industrial area where he walked alone up a gravel path and into Mexico. For the first time, he became an illegal immigrant.

Mr. Cruz boarded a minibus, filled with local passengers, to begin his trip through the southern state of Chiapas. As instructed by the driver, at toll plazas he hunched down between the seats and covered himself with the passengers’ backpacks, suitcases and packages. The driver whistled when it was safe to come out.

He was vulnerable to criminals who might try to kidnap him, police officers seeking bribes and the more robust immigration enforcement that has taken root in recent years in southern Mexico. Under pressure from Washington, the Mexican government has cracked down on migrants passing through its territory. Because of the greater vigilance along the smuggling routes, between 80 and 95 percent of migrants bound for the United States used so-called coyotes in recent years, compared with fewer than half in the early 1970s, Border Patrol surveys of captured migrants found.

Just two days into Mr. Cruz’s journey, his family had to wire the smuggling network $1,900 to get him through southern Mexico.

Mr. Cruz spent several days in a small house near Tuxtla Gutiérrez, the capital of Chiapas, sleeping on a sofa. It was comfortable enough, but he wondered what the holdup was. “They want to move you even more than you do,” his uncle assured him, “because they have to pay for every day that you’re there but I don’t pay extra.”

When the smugglers finally continued the trip, Mr. Cruz spent a night on a hammock at an isolated spot near the Malpaso Dam, surrounded by trees. “I was headed for Puebla yesterday, but immigration stopped two people who had gone ahead,” he texted his uncle. “So they moved me here instead.”

The next morning, Mr. Cruz climbed into the cab of a tractor-trailer and rode alongside the driver. At a toll area, he had his first run-in with the police. Officers stopped the truck for a routine check, and after seeing Mr. Cruz’s Salvadoran ID, realized that he was in Mexico illegally. They demanded money or else they would deport him, Mr. Cruz said.

Mr. Cruz spent a night near one of the Grijalva River’s dams, delayed on his way to Puebla, in Mexico. Fred Ramos for The New York Times

Gulf of Mexico Puebla PUEBLA VERACRUZ MEXICO Malpaso Dam OAXACA Tuxtla Gutiérrez

He fished out $170 he had hidden in his shoes. Mr. Cruz remembered one of the police officers telling him it was his lucky day. “I was getting out of trouble. I was able to get away because I had this money on me,” he said.

The officers stole the truck driver’s cash as well. Once they left, the driver threatened to hand the migrant over to violent drug traffickers unless Mr. Cruz got him $600. Panicked, Mr. Cruz called his aunt and uncle in the United States for help, but they didn’t answer.

Papi They arrested me and stole all my money A man that’s transporting me helped me But the feds took all of it You missed a call from Christopher at 2:46pm Papi You missed a call from Christopher at 2:49pm

Thousands of miles away, the couple emerged from a water park — a rare day off with their young daughter — to find the missed calls. They had been observing Mr. Cruz’s progress on their smartphones and computers, watching him move northward through small towns, streets full of pastel houses and parking lots for Walmarts and Pemex gas stations.

On the phone with his relatives, he described the police theft and the driver’s threat. His uncle quickly turned to the Mexican woman at the smuggling network, who found another driver to carry Mr. Cruz to Puebla. The uncle asked Mr. Cruz to remain calm.

“Stay calm, stay calm, everyone keeps saying that,” Mr. Cruz responded in a Facebook message. “Knowing I’ve never been away from home. That I’m easily frightened in a situation like this. And you want me to keep calm and keep calm. I can’t.”

On subsequent traffic stops, the bribe for the police was always the same: 1,500 Mexican pesos, or about $84. At first Mr. Cruz tried to lie, saying he wasn’t a migrant but was on his way to Monterrey to make a delivery. Eventually he dropped any pretense. The fourth time he was stopped for a payoff, the cop simply said, “You already know how much this is.”

Doors Locked, Windows Barred

Mr. Cruz made it as far as Puebla, southeast of Mexico City and a pivot point on the journey. His family wired $450 to the smugglers, including pocket money for Mr. Cruz for food and bribes.

Mr. Cruz made it to Puebla, paying hundreds of dollars in bribes to police officers along the way. Fred Ramos for The New York Times

The woman he stayed with in Puebla treated him well, feeding him the local delicacy “chiles en nogada,” chiles in cream sauce with pomegranate seeds: green, white and red like the Mexican flag. She took him to buy soap, shampoo and toothpaste, but also got rid of his shoes — Bracos, a brand that the Mexican authorities would recognize as Salvadoran — and gave him another pair.

After four days there the smugglers tried to move him north, but word came that some migrants had been killed near Monterrey, his next stop, so they brought him back to Puebla. After waiting three more days, Mr. Cruz hid with a young woman and her infant son in the sleeping compartment of a tractor-trailer for the overnight drive to Monterrey.

On my way back to Puebla People are being killed there, so I was turned back Ok. Better to be safe

The driver insisted they each take a pill, saying it was to keep them alert in case they were stopped. He then ground another pill into powder and mixed part of it in the baby’s bottle before snorting the rest himself. Mr. Cruz said that he did not know what was in the pill but that after taking it he couldn’t have slept even if he had tried.

He arrived in Monterrey, the third-largest metropolitan area in Mexico and an industrial and commercial hub. Far from the booming downtown, behind a metal front gate, the windows and doors were shut and barred on the cinder-block house where Mr. Cruz was kept. Trash was everywhere. The small courtyard was filled with mud and debris. Ants and cockroaches crawled indoors. The only water ran brown and unfiltered from the faucet. A terrible smell wafted from the bathroom.

Mr. Cruz spent four days in Monterrey, locked in a dingy stash house far from the bustling downtown. Fred Ramos for The New York Times

U.S. TEXAS MEXICO McAllen Matamoros Monterrey

“It was like a prison,” Mr. Cruz said.

Migrants like Mr. Cruz had to pay their captors to bring them bottled water or snacks, if they even had the cash to pay prices that were triple those at the local convenience store. Otherwise food arrived only every other day, in the form of a carton of 30 eggs to feed the dozen or so people typically there. At night, Mr. Cruz said, he lay on a thin mat on the floor but couldn’t sleep with mice and insects running over him.

Every day smugglers dropped off and picked up migrants, who were kept locked inside. A Guatemalan man everyone called “el dueño,” “the owner,” was in charge because he had been there the longest. He had run out of money to continue his journey a month and a half earlier.

Mr. Cruz was stuck there for four days. His uncle sent $2,800, and they carried him onward to the eastern Mexican border state of Tamaulipas, just below southern Texas. His journey took him first to Ciudad Miguel Alemán, across from Roma, Tex., before he boarded a bus for Matamoros, two and a half hours away, with the assumed name Carlos Hernandez on his ticket.

And you weren’t stopped at all? No papi, there wasn’t a single checkpoint Just an army one but they said nothing, didn’t check anything Ok. And you crossed all the way next to the river after Miguel Alemán? We got to Reynosa and at one turn you could see a big river That’s the one you’ll cross. The other side is the USA

Tamaulipas has become known for violent confrontations between organized crime groups, and migrants caught in the middle have been massacred. In the summer of 2010, the corpses of 72 migrants killed by cartel members were discovered there in San Fernando. The message was clear: Crossing into the United States without permission from the drug traffickers, or narcos, who controlled the border territory could be lethal.

Rodolfo Casillas, an expert on illegal migration at the Facultad Latinoamericana de Ciencias Sociales in Mexico, estimated that up to $1,000 of the total smuggling price went to pay off the narcos for the “derecho de paso,” or right to pass. One migrant testifying in a human-smuggling case in Texas last year told the authorities that he had paid 11,000 pesos, or about $630, for protection from the Zetas criminal organization, and just 1,500 pesos for assistance with the river crossing.

A patrol near the border in Matamoros. Under pressure from Washington, the Mexican government has cracked down on migrants passing through its territory. Chang W. Lee/The New York Times

The house where Mr. Cruz was kept in Matamoros was better maintained than the hovel in Monterrey. He and the 30 other migrants could bathe with buckets of water from a pair of concrete basins with spigots outside. The men watching the house, tied to the narcos, brought them beers and even offered them drugs from bundles of cocaine and marijuana.

“If you ran out of money, that’s when they would offer to cross you as a mule,” Mr. Cruz said.

Some migrants at the house agreed to ferry drugs.

After sending off the migrants with drugs one day, the traffickers returned to the stash house seething. “They were extremely angry,” Mr. Cruz recalled, not because the migrants had been arrested but because they had lost their shipment of drugs.

Back and Forth Across the Rio Grande

Mr. Cruz was sick. The temperature along his journey had yo-yoed 40 degrees as the altitude climbed to 7,000 feet in Puebla before dropping to sea level in Matamoros. The unsanitary conditions in Monterrey probably hadn’t helped.

Mr. Cruz was eager to leave the house in Matamoros, but his coughing spasms gave the smugglers pause. They didn’t want him giving their position away as a group tried to slip past Border Patrol agents.

His uncle asked Mr. Cruz if the Mexican woman from the smuggling network could insist that they move him anyway. But Mr. Cruz realized she had little sway at the border. “Someone else decides who leaves,” he told his uncle, “and she pays them.”

His family sent $180 to the smugglers, who said half would go toward medicine and half for a backup phone. Doses of cough syrup, along with several days of rest, seemed to help. That Saturday night Mr. Cruz wrote to his uncle, “They’re going to say if I leave in the morning.” Shortly after midnight he wrote again, saying, “At 4 o’clock in the morning I go.”

We have to pass the river and the wall and then be picked up. If all goes well we will be in McAllen in 3 hours Ok, I hope so! Ok. I hope it’s clear and there’s no Border Patrol so we cross quickly

The region, where the Rio Grande coils and bends in switchbacks, has become the central battleground of the southwest frontier for illegal entries. Some 138,000 people were caught trying to cross here in 2017, close to half of all those apprehended from the California coast all the way to the Gulf of Mexico.

Illegal crossings fell significantly in the initial months of the Trump administration but shot up this year: From March to May, the number of migrants apprehended along the southwest border was triple the total for the same period in 2017, though far below the levels of a decade or two ago. Last year Customs and Border Protection intercepted 303,916 people there — compared with more than 1.6 million in 2000.

As part of the $1.3 trillion spending bill that Congress passed in March, $1.375 billion in funding went for more than 90 miles of physical barriers along the border with Mexico. Of that, 33 miles will be built in the Rio Grande Valley in southern Texas, where Mr. Cruz was trying to cross.

For all the debate about Mr. Trump’s proposed wall, a virtual barrier was steadily strengthened under previous administrations. Doughy blimps equipped with cameras provide video surveillance, with thermal imaging for nighttime. Migrants unknowingly trip advanced seismic sensors with their first steps on American soil. The number of Border Patrol agents has grown to about 20,000 from roughly 9,000 in 2001, while budgets have quadrupled, spent on everything from all-terrain vehicles and horse patrols to helicopters and advanced reconnaissance drones.

That gives the Border Patrol a much better chance of combating criminal smuggling networks, which use Facebook and Craigslist to recruit drivers, satellite phones and encrypted communication applications to direct them, night-vision technology to scan for patrols, and off-the shelf tracking devices to monitor moving vehicles.

“They have evolved as the technology has evolved, and we have as well,” said Benjamine Huffman, chief of strategic planning and analysis for the Border Patrol.

Early that morning, the smugglers gathered Mr. Cruz, one of two dozen migrants from two stash houses in town, and crammed them into the back of an S.U.V., stacking them like cordwood. Wedged into a corner of the trunk with the weight of his fellow migrants crushing down on him, Mr. Cruz struggled to catch his breath.

Once at the Rio Grande, he swam to the other side, while those who couldn’t swim were pulled on the inner tubes. The migrants in his group began to mount the border fence. But the Border Patrol descended, grabbing some of the first arrivals. He realized he had to turn back.

The Rio Grande, which Mr. Cruz and other migrants swam to enter the United States. Chang W. Lee/The New York Times

“There was no other alternative but to cross the river,” Mr. Cruz said.

As was customary, the smugglers would give him three tries to make it across safely. One chance was gone. Mr. Cruz steeled himself to try again at a different bend along the river.

The temperature had climbed to 93 degrees by midday Sunday when Mr. Cruz made his second illegal visit to the United States, at another crossing nearby. It was even shorter than his first.

Border Patrol agents swarmed the group as they made landfall on the north bank again. One agent got a hand on Mr. Cruz’s back but, instead of arresting him, sent him sprawling into the river. Swallowing water and struggling to stay afloat, Mr. Cruz said, he barely managed to swim back to Mexico.

Patrolling the border in Brownsville, Tex. Mexico is to the right of the Rio Grande. Chang W. Lee/The New York Times

The sun was low and dusk approaching by the time the coyotes brought the migrants to their third crossing point. The smugglers said the spot, more isolated, was usually reserved for moving drug shipments, more valuable than migrants. Mr. Cruz would have to swim across the Rio Grande for the fifth time that day.

Of the 17 people left from the two dozen in the morning, Mr. Cruz recalled, five were women, including one who appeared about eight months pregnant and another in her 50s, he guessed. He wondered how they would make it, but his family had warned him: Worry about yourself. Do not stop for anyone.

Mr. Cruz could hardly believe the determination of the pregnant woman as they emerged from the river again and started to run. But the older woman slipped behind and fell to the ground. The guide did nothing. “He just left her there,” Mr. Cruz said.

Checkpoints and Hidden Compartments

The driver of the waiting S.U.V. honked his horn to get their attention. He was angry, expecting just a few migrants to crawl out of the South Texas field and instead finding 16 people. In a region full of Border Patrol agents, it was a risky load to carry.

The driver told Mr. Cruz to ride shotgun, and he saw bundles of cocaine on the passenger seat. But it was only a short drive to a parking lot where the smugglers separated the group into different cars, depending on their destinations. Mr. Cruz and five others got into a Cadillac headed an hour northwest to a stash house in McAllen, Tex.

A recently busted stash house in McAllen, Tex. State authorities offer rewards for tips about such hide-outs. Chang W. Lee/The New York Times

Drop-offs and pickups are often meticulously planned so that migrants are ready to jump in as soon as the car pulls up. Smugglers sometimes mark migrants with colored tape to quickly sort who is going where. Smugglers often drive two cars, using one to draw the attention of law enforcement and another to carry the migrants.

Border Patrol officers have grown more aggressive in their search for unauthorized immigrants throughout the 100-mile band of territory inside the United States border, where they have authority to establish checkpoints and perform searches.

At the stash house in McAllen, the caretakers took away phones and even migrants’ shoes so they wouldn’t run away. “One particular person, they beat him up and kicked him because he wasn’t paying attention,” Mr. Cruz said.

He estimated there were 70 people inside. They were given no food and were not allowed to speak to one another or even move without permission. Neighbors in border regions can be quick to report suspected stash houses. More than a third of all those busted by Customs and Border Protection last year — 140 out of 407 in the Southwest — were in the Rio Grande Valley, where Mr. Cruz was.

After just a day and a half in McAllen, Mr. Cruz huddled with four other migrants in the sleeping compartment of a tractor-trailer headed to San Antonio. They were nearly discovered by agents during a routine search at a highway checkpoint, cowering under blankets as they felt someone check the bedding they were hiding under. Mr. Cruz was transferred to a minivan with a concealed compartment built under the back seat, where he hid for part of the ride.

A Border Patrol checkpoint north of McAllen, in a band of territory where officers have grown more aggressive in their search for unauthorized immigrants. Chang W. Lee/The New York Times

Mr. Cruz was brought to one last stash house, stripped to just his boxer shorts in a room “with no electricity, no light coming through, no windows and one big bed with four men,” as he described it, essentially a hostage until the final payments were made. Two days passed.

His family had to transfer the remaining $6,500 to the smuggling network. Although a record $28.8 billion in remittances was sent to Mexico last year, the authorities regularly flag suspicious transactions. Mr. Cruz’s uncle had to break up the sum into smaller, less conspicuous transfers.

Even with the precautions, one of the payments was flagged, canceled and had to be re-sent to a different recipient. Only when the final installment arrived in Mexico could Mr. Cruz go. “They gave me my clothes to put back on, and they blindfolded me again,” he said.

The smugglers drove him to a gas station. There he saw the familiar face of his uncle. Mr. Cruz began to cry.

Relief at finishing his journey did not last long. Mr. Cruz was now in an unfamiliar country, where he did not speak the language and could not legally hold a job. He would have to hide in plain sight. He was $12,630 in debt. But, he said, at least he didn’t fear for his life. “Here I know I’m safe,” he said.

His uncle found him tougher and more mature after the journey’s hardships. Mr. Cruz looked ahead to earning enough money to begin the cycle again, paying for his son, his sister and his grandmother to join him in the United States. “I dream of bringing them over here,” he said.