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.’”

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.

Read More