The 30 migrants were huddled under a tree on a cold night as an American government helicopter hovered overhead, its searchlight sweeping the tree’s boughs and the hard earth around it. From where they crouched, the men, women and children could see American soil only yards away, on the other side of the tall border fence separating Mexico from the United States.
They had come to jump the fence. But so many things perplexed them.
What if they got caught? If they did, could they apply for asylum? Would children be separated from their parents? Was it possible to run to San Diego? Who was in that patrol vehicle on the other side of the fence? Were the border guards allowed to shoot them?
A long, arduous journey from their homes in Central America, traveling as part of a large caravan, followed by more than two weeks languishing in an overcrowded and increasingly fetid migrant shelter in Tijuana, had come to this: a late-night trip to the border fence, and perhaps a desperate attempt to cross.
“We’re going for a better future for our son, in a place that’s safe,” said Samuel García, 30, a Honduran who was crouched alongside his wife and their 5-year-old son.
Mr. García nodded toward the border fortifications of a nation whose president did not want him to enter.
“There’s got to be a weak spot,” he said.
Many of the migrants who arrived on the northern Mexico border in caravans in recent weeks had set out from home with a different idea of how things might turn out.
President Trump had cast them as an invading horde of opportunists looking to game the American immigration system. But many clung to the belief that once they arrived at the border, the president’s heart would be touched and the gates would magically swing open.
In recent days, they have seen their dreams all but splinter against the cold, immovable reality of the border, and of American policy.
The journey for more than 6,000 migrants came to a halt here in Tijuana in mid-November. For weeks, most watched the hours and days pass in a municipal sports complex that had been converted into a shelter. Food was scarce. Privacy was nonexistent. Respiratory diseases flourished.
If any migrants still thought Mr. Trump might be moved by their plight, they were disabused of that notion a week ago, when hundreds broke away from a peaceful march and ran toward the American border. They were repelled by United States border guards firing tear gas, and scores of migrants were arrested by the Mexican authorities.
Several days later, a big rainstorm descended on the city, turning the sports complex into a swamp and adding to the migrants’ misery.
In light of the week’s events, and Mr. Trump’s continuing tough rhetoric, the migrants have started re-evaluating their options amid growing frustration and desperation.
Hundreds have called it quits and signed up to be voluntarily repatriated to their homelands.
Many others have decided that their best course of action is to take the Mexican government up on its offer of one-year humanitarian visas that permit them to stay and work in Mexico, even if, for some, it is just to bide their time until they can try to enter the United States.
And more than 2,000 have sought appointments with American immigration officials to petition for asylum, though Mr. Trump has made this more difficult, and wait times for an interview now stretch to more than two months.
But some migrants have arrived at another conclusion: Their best bet now, they believe, is to try to cross the border illegally.
Some of them have sought entry by clandestine routes, hiring smugglers to show them the blind spots along the border and guide them across, though few can afford that.
Other migrants from the caravans have on recent nights made their way unguided out to the westernmost stretch of the border, where the tall metal border fence passes through sunburned hills and alongside residential communities in western Tijuana, emerges at the beach and plunges into the Pacific Ocean.
Some have jumped into the cold, rough ocean waters and tried to swim around the fence to the United States, only to be plucked from the surf by the authorities.
This stretch of the border is one of the most heavily guarded and scrutinized. But for some, that is part of the calculation: Having grown impatient as they wait for their asylum appointments, they hope to speed things up by getting caught and petitioning for asylum on the spot, a provision in the law that Mr. Trump is trying to end.
These are the knowledgeable people.
Other migrants have no idea what they are doing. They find themselves adrift in a sea of rumors and misinformation about American and Mexican immigration law and their rights and options. Standing near the border, all they can see is American territory through the gaps in the metal fence — and the opportunities it seems to promise.
So early Saturday morning, the 30 migrants hiding under the boughs of the tree watched the border and made their calculations.
The group had walked or taken taxis from the waterlogged sports complex, leaving behind most of their possessions. Now, United States Border guards on the other side of the fence were so close the migrants could hear their laughter.
“It seems like a difficult moment to get to the other side,” Mr. García murmured.
He said he had tried to sign up for an appointment to seek American asylum but had been told by Mexican police officers that he could no longer do so, which confused him. He was left with the belief that Mr. Trump had ended the American asylum system.
If he and his family made it across the fence, he said, he had no intention of turning himself in. Deportation seemed a certainty. “The Americans are not trustworthy,” he said.
Instead, the family was thinking about making a run for it. Mr. García had packed half a gallon of water in his backpack, in case they managed to run all the way to San Diego, some 20 miles away.
Suddenly, another man who had just joined the group stood up, sprinted toward the fence and started climbing. An American border guard sitting in a vehicle at the top of a slope on the other side yelled: “Get down!”
Undeterred, the migrant hoisted himself over the barrier, dropped to the other side and put his arms in the air in an act of surrender, apparently intending to seek asylum. He was surrounded by United States Border Patrol agents, hustled into an S.U.V. and driven away.
The other migrants watched in silence, then eventually decided to call it quits for the night and made their way down to the beach, where they peered through the fence bathed in floodlights.
Earlier that night, two young men from El Salvador had come to explore that same stretch of border fence.
“My destiny is to make it to the other side,” said one of the men, César Jovel, 18. “We’ve been suffering, and now we just want to cross.”
Both Mr. Jovel and his friend, Daniel Cruz, also 18, said they had fled El Salvador because of gang threats.
The men decided their best bet was to dig.
They settled on a spot along a darkened stretch of the border and, using their hands, excavated a shallow ditch under the fence. Mr. Jovel went first, squeezing his slender body under the barrier then crouching behind a clump of tall weeds on the other side. Mr. Cruz quickly followed.
But a United States Border Patrol vehicle suddenly appeared. An agent was shouting at them. And the two leapt into the ditch and slid back to Mexico.
Discouraged, they started walking the five miles back to the migrant shelter. They pointed their cellphone lights into storm drains; they had heard rumors of tunnels and secret crossing points.
Mr. Cruz said he was exploring a range of options for the next chapter of his journey.
A relative had promised to contract a smuggler for him, but that deal had fallen through. A humanitarian visa in Mexico remained his fallback option if he could not get to the United States.
Despite their failed first attempt to cross illegally, the two friends remained undeterred.
“I am going to try to make it across,” Mr. Jovel vowed. “I came here with a dream.”