MEXICO CITY — Officials in the northern Mexico border state of Coahuila said Tuesday they have closed a shelter in the border city of Piedras Negras, near Texas, where about 1,600 Central American migrants had been confined during the past two weeks.

Many of the migrants have been bused to neighboring states, leading to complaints that Coahuila was dumping migrants on other cities to clear out the camp at an empty factory building.

Jose Borrego, a Coahuila state spokesman, confirmed that the shelter in Piedras Negras was closed Tuesday, a day earlier than scheduled.

The shelter’s population had been steadily falling since last week as migrants who had obtained humanitarian visas were given bus rides to other cities where they would have a better chance of finding work.

The migrants arrived at the border hoping to request asylum in the United States, but Mexican authorities corralled them in the shelter and only about a dozen were allowed to request asylum at the Eagle Pass, Texas crossing each day.

Since last week, buses have been taking migrants from Piedras Negras to Ciudad Juarez and to Hermosillo, Sonora, the latter a stepping stone toward the border city of Tijuana, which was inundated with migrants from a previous caravan last year. Other buses have gone to the nearby city of Monterrey and to the border town of Reynosa, across the Rio Grande from McAllen, Texas.

The arrival of hundreds of migrants angered authorities in Ciudad Juarez, which is across from El Paso, Texas. Officials there set up an improvised shelter at a gymnasium, but complained that Coahuila officials had lured the migrants by telling them it would be easier to cross into the U.S. at El Paso.