TIJUANA, Mexico — To Carmen Palma, a Salvadoran migrant waiting at a shelter just south of the border, her 6-year-old daughter’s life depends on getting asylum in the United States. She and hundreds of thousands of others have staked their lives on getting there.

“In El Salvador, there is only death,” Palma said. “Dead bodies are in the streets; women are violated and killed. We are ready to risk having our children separated from us so we can come to the United States.”

North of the border, President Trump has staked his presidency on keeping unauthorized immigrants out, making it harder to seek asylum, deploying more law enforcement across the region, trying to build a wall. His administration also tried to deter immigrants by taking away their children at the border — a policy he abandoned by executive order Wednesday in the face of ferocious political backlash.

Trump’s will and migrants’ desperation are two powerful forces colliding in the immigrant shelters, crossings, courtrooms, detention centers and the vast empty desert along the 2,000-mile U.S.-Mexico border. The struggle is playing out from Tijuana on the Pacific Ocean to Nogales in the Arizona desert to Brownsville on the Gulf of Mexico, with all the predictability, clarity and order of an earthquake.

The Trump administration ordered an end to family separations but has offered no plan to reunite the more than 2,300 children it separated from their parents. (Jon Gerberg, Jorge Ribas/The Washington Post)

Trump’s executive order and his tweets about immigrants “infesting” America and Congress avoiding immigration issues until after the midterm elections have created new uncertainty along an already tense border.

What exactly is the new policy? Where are the separated children? When will they be reunited with their parents? Migrants, advocates and law enforcement officials are struggling to interpret the new landscape amid a mix of hope, fear, confusion and frustration.

At a border crossing in Nogales, Abel, a school bus driver from Guatemala, and his 17-year-old son sat in the 100-degree heat Thursday, hoping to be allowed into the United States to seek asylum. Abel said gangs had been recruiting his son, so they decided to flee.

They had no idea that families were being separated at the border until Wednesday, when they heard other migrants talking about it. They said they hoped not to be separated, but they responded “si” in unison when asked whether they would be willing to spend months in detention together.

“What other option do we have but to come?” Abel said. “We can’t go back. If they see us, they’ll kill us. . . . We trust in God, and in the laws of the United States.”

Later in the day, Abel and his son were allowed to cross the border and request asylum. It is unclear what happened to them after that.

Some officials insisted that Trump’s “zero tolerance” policy was still in effect and every person crossing border illegally would be prosecuted. Others sent conflicting signals, and still others, speaking privately, said they really didn’t know what the policy was anymore.

In a federal courtroom in El Paso, 19 handcuffed parents facing charges of illegally entering the country were abruptly removed from the courtroom without being prosecuted. At about the same time, the same thing happened to 17 more in McAllen, Tex. And federal officials in Tucson and Yuma, Ariz., said no parents were prosecuted for illegal entry in courthouses there on Thursday.

A Honduran family tried to seek asylum in the U.S. through a port of entry. They were turned away and detained by Mexican authorities. (Jon Gerberg, Whitney Leaming/The Washington Post)

Carlos Garcia, an immigration attorney who was in the McAllen courtroom when the defendants — all parents — were removed, said the government’s response seemed “disorganized” and “confusing.”

“If I showed up to court that unprepared, the judge would yell at me and probably kick me out of court and tell me I’m doing a disservice to my client,” he said. “If the government is that confused and that disorganized, they’re doing a disservice to us, the American people.”

In the Rio Grande Valley in South Texas, Raul L. Ortiz, a top leader in the U.S. Border Patrol’s local office, said the zero-tolerance policy remained in effect. Parents would still be prosecuted for illegally crossing the border. And then they would be handed over to Immigration and Customs Enforcement for deportation.

“There has to be a consequence for violating the law,” said Ortiz, sitting behind his desk in an office decorated with photographs, a giant map of the sprawling Rio Grande Valley sector and a whiteboard with the words “Zero Tolerance.” “We want to try and deter folks from making that dangerous trek. All they’re doing is fueling the cartels.”

Mexico’s drug cartels are also active in human smuggling. Ortiz said the Rio Grande Valley accounts for 40 percent of the Border Patrol’s arrests and 44 percent of drug seizures, particularly cocaine.

On the far western end of the border, hundreds more asylum seekers, many of them women with small children, waited in a Tijuana plaza just south of the busy San Ysidro border crossing near San Diego. Some children slept, and others played with toys or kicked a soccer ball while their parents tried to understand what was happening north of the border.

“I am still afraid they will take my children, but I’ve got to try, to try to get a better life for my children,” said Socorro Benitez, 25, who brought her three young children on a four-day bus trip from Michoacan, a Mexican state plagued by drug-cartel violence.

She was hoping to win asylum and be allowed to join her sister in Utah. “I want President Trump to help the families,” she said. “We need his help.”

Whatever the new policies were, as far as anyone could tell, most desperate parents along the border were still no closer to being reunited with their children. At least 2,500 had been placed in U.S. federal custody since May 5, and though some have been returned to their parents, most are still spread out in shelters, foster homes and other facilities across the country.

In McAllen, a largely Hispanic city, the chaos and confusion seemed somehow worse because of a massive morning downpour that flooded streets and swamped cars on Thursday.

The electricity went out at the federal courthouse. Lawyers trying to reunite parents with their children rushed into the building anyway, their suits soaked. They took information from detained parents, who were weeping and begging for help finding their children who had been taken away before Trump’s executive order.

A federal judge in McAllen held a hearing to consider whether he should order federal agents to reunite children with parents given a “time served” sentence for illegally crossing the border.

Magistrate Judge Peter E. Ormsby said that the prolonged separations were “not an acceptable situation,” but that Trump’s executive order on Wednesday “makes it a moot point.”

Azalea Aleman-Bendiks, an assistant federal public defender, said hundreds of parents and children likely remain apart. She estimated 800 to 900 children were separated from their parents just in the McAllen area. She also reviewed a sample of cases of 39 children taken from 38 parents. Of those parents, 29 were still detained as of Thursday. She wasn’t able to locate the other nine.

Raul L. Ortiz of U.S. Border Patrol's Rio Grande Valley sector said he anticipates prosecutions will continue under the “zero tolerance” immigration policy. (Jon Gerberg/The Washington Post)

In Tucson, Laura St. John, legal director at the Florence Project, which provides free legal aid to detainees, said Trump’s executive order had done nothing to reunite the separated families, including 450 in Arizona.

“The order is pretty vague,” she said. “But the implication is clear that instead of separating families, they are planning on indefinitely detaining families in a jail, which is just as bad.”

After a day of turmoil and confusion, more than 200 El Paso Catholics joined Thursday night under a statue of the Virgin of Guadalupe at St. Mark Catholic Church. They sang and prayed the rosary, in Spanish and in English. They held signs that read, “Immigrants are human too” and “Keep families together.”

Jocelyn, a Brazilian immigrant who asked that her last name not be used because she fled an abusive husband, told the crowd her story of being arrested by the Border Patrol in 2017; she was separated from her 14-year-old son, James, for nine months.

Jocelyn said she was charged with misdemeanor illegal entry and James was sent to a shelter in Chicago. She pleaded guilty in September 2017 and was sentenced to time served. She was then held in immigration detention centers in West Texas while she made her case for asylum. She was released on bond in April, but it took the government two months to return her son.

Jocelyn said she and James now live in an El Paso migrant shelter while their asylum claim is pending. “Thank God, we’re okay,” she said.

On Thursday evening in Nogales, Mexico, just south of its sister city in Arizona, four Central American families waiting their turn to request asylum at the border shared the makeshift pews of the San Juan Bosco shelter’s small chapel.

Juan Francisco Loureiro, who has run the small shelter less than two miles into Mexico for 36 years, said the number of Central Americans here had plummeted since a week earlier, when there were about 30 families.

“It’s gone down in recent days because of the news that has gone all around the world about kids being put into cages” in the United States, he said. “Yesterday, two families went back to Guatemala because they were afraid of losing their children.”

The families still in the shelter told similar stories: gang violence and death threats, gangs trying to recruit fathers and sons, relatives murdered and desperate trips to the U.S. border. Some said they thought about seeking asylum in Mexico, but the gangs and drug cartels they were fleeing also operate there.

Five families had been allowed to enter the United States earlier in the day to ask for asylum, though their fates were not clear. Now five more took their places in line, unsure of what to expect.

Loureiro said he is glad Trump’s policy has been reversed, but it is just a matter of time until the news reaches Central America.

“When people see they aren’t separating families,” he said, “more are going to come.”

Sacchetti reported from McAllen, Miller reported from Nogales, Perry reported from Tijuana, and Sullivan reported from Washington. Jon Gerberg in McAllen and Robert Moore in El Paso contributed to this report.