TIJUANA, Mexico — By the time Francisca, Armando and their two surviving children made it to the United States border in late February, they were hungry, exhausted and virtually penniless. But the couple, who said that a son had been killed by a gang back in El Salvador and that their daughter had nearly been raped, thought they had finally reached safety.

Under United States and international law, all people who ask for asylum are supposed to be allowed into the country to plead their case. But instead, they said, a Customs and Border Protection agent shooed them away.

“There is no asylum here,” Francisca, 32, recalled the agent telling them. “We are not granting asylum.”

Customs agents have increasingly turned away asylum seekers without so much as an interview, according to migrants and their lawyers, in a trend first noted several months ago and that appeared to accelerate after President Trump’s inauguration. That has left an untold number of migrants trapped in Mexico, where they have sometimes fallen prey to kidnappers seeking ransom or been driven into the hands of drug cartels and smugglers. Some have tried to enter the United States illegally and dangerously, through the desert or across the Rio Grande, a risky journey.