The processing station at the bridge connecting it to Reynosa in Mexico became overwhelmed, and arrivals were sleeping on floors and in offices.

A new $3.8 million emergency facility which can process 1,000 people is opening just outside town. It inludes a 40ft high tent the length of a football pitch for the illegal immigrants to sleep in.

This week Gil Kerlikowske, US Commissioner of Customs and Border Protection, went to inspect it. Mr Kerlikowske sees the flood of migrants as a humanitarian rather than a security crisis.

He was appointed by President Barack Obama and is retiring the day Mr Trump takes office. He said: We are able to deal with this influx or surge in a humanitarian way."

The illegal immigrants themselves don't agree. They call the new detention centre "the dog pound".

Most of those currently coming across are from El Salvador, Guatemala, and Honduras. But others have arrived from Brazil, Peru, even Ukraine, Romania, Africa and China. There have been families of up to a dozen, along with babies born on the trip. One woman gave birth in the church hall at Sacred Heart.

There is currently a so-called "catch and release" system in place at the border. At detention centres illegal immigrants are asked questions about whether they face a threat in their country of origin. If so, and they are deemed not a security risk to America, they are let go after a few days.

They are given a date to appear in court for an immigration hearing but that could be years away. Sometimes they are fitted with an ankle monitor. Mr Trump has vowed to quickly end catch-and-release. His stated policy is that "anyone who illegally crosses the border will be detained until they are removed out of our country".

The Border Patrol agents' union, which endorsed Mr Trump, enthusiastically supports that. It said: "They very well could be immigrants looking for a better life in America. Or, they could be radicalised terrorists seeking to harm America. "We do not know, and in these dangerous times that (catch and release) is unacceptable and reckless. It is time to start enforcing the laws on the books."

But the people of McAllen have been more welcoming. Josh Ramirez, the town's Incident Commander for Immigrants and Refugees, said: "If these people go back they could be killed. If the wall is built people like them will be held back and probably killed. These are not criminals, these are people with babies and they need help."

Some of the people Mr Trump would send back bring with them tales of horrific violence.

Maria, a 24-year-old from El Salvador, had already been released from the detention centre with an ankle monitor, and said she was heading to stay with an uncle in Los Angeles.

"My cousin was killed and cut up with a machete," she said. "Something very bad was going to happen to me if I stayed in my country. I'm really happy to be here."

She sold her home and paid $7,000 to people smugglers to get her through Mexico. They then drove her across the bridge from Reynosa to McAllen, where she got out of the car and walked up to border patrol agents and surrendered.

At the Sacred Heart church Catholic volunteers provide all the illegal immigrants with a manila envelope containing details of the bus trips and transfers they need to make to reach wherever they are going in the United States.

Most have no money but clutch open bus tickets pre-purchased by relatives or friends at the other end.

In addition to their bus tickets the envelopes also contain a piece of paper saying in large type: "Please help me. I don't speak English. What bus do I need to take? Thank you for your help!"

Before leaving they take a shower, get a change of clothes donated by parishioners, and are provided with ham sandwiches and a granola bar for the journey.

"They're lost and scared and being here for a short time helps them feel like people again," said Sister Norma Pimentel, a nun who has been receiving and helping border crossers at Sacred Heart for two years. "You see the transformation in their faces. Their dignity is restored."

She added: "They feel the possibilities of staying here (in the US) are less now with the new Administration. It's important not to forget that these are human beings in great need and we have to help them."

The church hall is packed with clothes donated by local people, although there is always a need for more warm coats.

Sister Norma asks those passing through not to take one if they are going somewhere warm. "You don't need a coat in Miami," she says.

Clutching their manila envelopes hundreds each day walk out of the church and cross the road to McAllen's bus station before fanning out across America. Many will never be seen by the authorities again.

"The numbers of people showing up for court hearings are not very good," said Mayor Darling. "The people go all over the place. They're all over the US. They're coming to a neighbourhood near you.

"Rounding them up and taking them for immigration hearings is impossible. If they do turn up, how do you tell five years later if something happened to them in their country of origin? Then, if not, how do you rip families apart? It's not a good system."

In the processing centres border patrol agents complain they have become "babysitters". Their jobs include making sure burritos are warmed up properly for newly arrived children.

Mr Darling said social workers were needed so the border agents could "do the jobs they are trained for". He also said a simple border wall would not work. "It's not going to stop people from Guatemala and El Salvador coming across the bridge," he said. The mayor suggested a more effective approach would be for Mr Trump to encourage Mexico to build a wall on its southern border with Guatemala. "Mexico would pay for that," he said.