CIUDAD JUÁREZ, Mexico — A crackdown on illegal immigration has sharply curbed the number of Central Americans and others trying to enter the United States. But Mexicans, who have not been bound by some of the same restrictions, have been showing up at the border in greater numbers, in many cases fleeing the escalating violence in their country.

Thousands have been stuck for weeks here in Ciudad Juárez and other border cities, waiting for permission to cross into the United States to apply for asylum. Human rights advocates say the bottleneck violates American and international law by forcing migrants to remain in a country where they feel their lives are at risk.

“We’re fearful here because you never know whether at any moment someone’s going to come and kill someone,” said Juan, 55, a farm laborer from the state of Zacatecas who fled with 10 members of his family after his son escaped a criminal group that was pressuring him to join their ranks.

“Wherever we are in Mexico, the gangs can find us,” said Juan, who, like many asylum seekers interviewed for this story, asked to be identified by his first name only out of fear for his safety.