Some migrants face additional delays from immigration judges who insist they find legal counsel before their cases can move forward.

Denis Rostran, of Honduras, said he called 10 lawyers who were listed on a document that Department of Homeland Security officials gave to him when he was sent back to Tijuana. None answered. Mr. Rostran said he has slept some nights on the street and has been robbed twice.

A Department of Homeland Security official said it was committed to ensuring migrants have legal assistance at no cost to the government. The agency also is not forcing migrants to return to Mexico who would “more likely than not” be persecuted or tortured there, the official said.

Twenty shelters and churches in Tijuana are housing around 3,000 migrants — and have almost reached their limit, said Esmeralda Siu, the executive coordinator of the Migrant Defense Coalition, in the Mexican state of Baja California. Many of the migrants are awaiting their court dates, she said, and do not expect to leave soon.

That means that newly arrived and future migrants will have few, if any, options for shelter.

“There’s no city, no state, that has sufficient resources to prepare for this,” said Gustavo Magallanes Cortés, the director of migration affairs for Baja California. “They’ve allowed these people to return, but cut the resources for migrants, which has led to chaos. Every day a shelter calls me and says, ‘I’ve run out of food.’”

But many of the waiting migrants are determined to keep hope.

“Many people say they’re doing this just so we get tired and give up on our cases,” said Daniela Diaz, 19, who said she left El Salvador after a member of the MS-13 gang threatened to rape and kill her. She has been living in a shelter in Tijuana since late January.

She is frustrated that following the rules and asking for asylum at a legal port of entry — instead of sneaking into the United States — have resulted in a system of immigration purgatory.

“There’s a lot of people throwing themselves over the wall,” Ms. Diaz said, “and we’re doing this the fair way.”