The mayor of Tijuana has declared a humanitarian crisis in his border city and said he was asking the United Nations for aid to deal with the approximately 5,000 Central American migrants, most of whom are camped inside a sports complex.

The comments by Juan Manuel Gastelum came as city officials and volunteers worked to assist the 4,976 men, women and children who arrived after more than a month on the road. The Trump administration has spent weeks lambasting the caravan, which it said was filled with criminals, gang members and even terrorists.

Manuel Figueroa, who leads the city’s social services department, said Tijuana was bringing in portable toilets and showers, as well as shampoo and soap, but

it was not enough.

“Because of the absence, the apathy and the abandonment of the federal government, we are having to turn to international institutions like the UN,” Figueroa said.

Rene Vazquez, 60, a Tijuana resident who was volunteering at the stadium, said Mexico’s federal government ignored the problem by allowing the caravan to cross the country without stopping. Now the city of 1.6 million is stuck with the fallout.

“I don’t have anything against the migrants, they were the most deceived, but this is affecting us all,” Vazquez said.

Gastelum vowed not to commit the city’s public resources to dealing with the situation. On Thursday, his government issued a statement saying it was requesting help from the UN’s Office for the Coordination of Humanitarian Affairs.

Vazquez, who plays for a football team that uses the sports complex, said Mexico should step up now and process humanitarian visas for the group so they can start looking for work. Meanwhile, since his team can no longer practise at the complex, he was spending time passing out donated pizzas and roasted chicken to the migrants.

The migrant caravan that left Honduras in mid-October was mostly well received by the towns it passed through along the way to the border. Even cities with few resources made sure the migrants had food and a place to rest.

But in those places, the caravan stayed at most two nights with the exception of Mexico City. In Tijuana, many of the migrants who are fleeing violence and poverty are seeking asylum in the US and face the prospect of spending months in the border city before they have the opportunity to speak with a US official.

Gastelum said the Mexican government has talked about sending 20 tons of resources to Tijuana to help but that three-quarters consisted of materials to reinforce the border and only five tons were for the migrants.

The mayor also criticised the federal government for not taking more seriously Donald Trump’s threat to shut down the border if his administration determined Mexico had lost “control” of the situation in Tijuana. “That’s serious,” he said.

The migrants also were receiving support from local churches, private citizens who have been providing food, as well as various agencies of the Baja California state government, which says it identified 7,000 job openings for those who qualify.

Adelaida Gonzalez, 37, of Guatemala City arrived in Tijuana three days ago and was having a hard time adjusting. She was tired of sleeping on a blanket on a dirt field, of waiting 30 minutes to go to the bathroom and again to get food and did not know how much more she could take.

“We would not have risked coming if we had known it was going to be this hard,” said Gonzales, who left Guatemala with her 15-year-old son and her neighbour.

She said she was considering accepting Mexico’s offer to stay and work in Chiapas as a refugee.