When U.S. Border Patrol agents started dumping migrants at a San Antonio bus station in late March, sometimes in the middle of the night with no warning, Colleen Bridger didn't know what to do.

The assistant city manager wanted to speak with the Border Patrol to figure out what was going on, how to coordinate the drop-off times and how to assess the volume of migrants San Antonio could expect in the future. But because the Texas city is 150 miles from the U.S.-Mexico border and had never dealt with an influx of undocumented immigrants before, there was a problem.

"I didn't even know the right department or division or office to call," Bridger said.

Since then, San Antonio has received more than 31,000 migrants released by the Border Patrol after they requested asylum. The city converted a former Quiznos restaurant into a migrant processing center, gave them food and medical screenings, provided cellphones so they could call relatives in the U.S, and partnered with a local church to provide overnight bed space. All told, those efforts have cost San Antonio more than $540,000.

Show caption Hide caption SAN ANTONIO, Texas – A group of migrants who recently crossed the U.S.-Mexico border are dropped off at the San Antonio Migrant Resource Center, where... SAN ANTONIO, Texas – A group of migrants who recently crossed the U.S.-Mexico border are dropped off at the San Antonio Migrant Resource Center, where they will arrange travel to their final destinations in the United States, on June 27, 2019. Courtney Sacco, USA TODAY Network

A USA TODAY review of dozens of communities along the border – and some far from it – shows that local governments have spent at least $7 million over the past year to care for thousands of undocumented migrants released after being detained by the federal government. Leaders in those communities say it's their moral responsibility to care for migrants who are often sick from their time in Border Patrol facilities, exhausted from their journey and usually out of money.

"We had to respond," Bridger said. "The vast majority of these families have young children, so the alternative is having hundreds of families sleeping on the streets."

City leaders from both political parties say they are frustrated with the Trump administration for what they describe as an unfunded mandate, forcing local communities to pick up the pieces of a broken federal immigration system.

In Deming, New Mexico, federal immigration authorities dealing with overcrowded federal properties have dumped more than 7,500 migrants on the streets of a community with a population of 14,000. Officials in Albuquerque, New Mexico, were already struggling to care for 4,000 homeless people before the federal government released 4,000 migrants there.

"This is not our job to do," said Pat Davis, a Democratic city councilor in Albuquerque, which budgeted $250,000 this year to help nonprofit groups care for migrants. "People pay city taxes to get their trash picked up, to have the police come when somebody breaks into their house, to put out fires. Now the federal government is telling cities that they have to use local money to fix a national problem."

The frustration is also evident in Republican-leaning communities.

Last year, the GOP-controlled San Diego County Board of Supervisors voted to join the Trump administration in a lawsuit challenging the state of California's "sanctuary" law that limits state cooperation with federal immigration officials. After Border Patrol started dropping off migrants in the county – some flown all the way from Texas – those same Republicans decided to step in to help the migrants.

The board voted to use county property to house migrants, and has coordinated food, medical care and transportation for more than 17,000 migrants, at a cost of more than $2.7 million so far this year.

Show caption Hide caption DEL RIO, Texas – Del Rio police officers stand outdoes after hours at the Val Verde Border Humanitarian Coalition Center as U.S Customs and Border... DEL RIO, Texas – Del Rio police officers stand outdoes after hours at the Val Verde Border Humanitarian Coalition Center as U.S Customs and Border Protection drop off a group of migrants on June 24, 2019. Courtney Sacco, USA TODAY Network

"We didn't want to see these families released onto our streets without any support or guidance," said Republican Supervisor Greg Cox, who co-sponsored the plan. "Health knows no borders."

In April, the board went a step farther, voting to sue the Trump administration over its practice of dumping migrants in border communities.

"We had to do the right thing, and we did," said Nathan Fletcher, the lone Democrat on the commission who co-sponsored the plan with Cox. "But it was wholly unnecessary. It was a manufactured political crisis so that Donald Trump has something to tweet about."

The millions spent by local governments represent only part of the costs of caring for migrants. A legion of nonprofit organizations, civil rights groups, medical centers, churches and volunteers have spent millions more and dedicated thousands of hours – often unpaid – to help care for migrants.

In Yuma, Arizona, where more than 5,000 migrants have been released, the Salvation Army provided a building to serve as an overnight shelter for them, the Red Cross provided cots, the Yuma Community Food Bank delivered meals, the Yuma Regional Medical Center helped care for them and Catholic Community Services coordinated transportation for migrants to reach their final destinations.

Combined, those organizations have spent more than $1.5 million to care for migrants this year. The city has not provided any funding to assist, but Yuma Mayor Douglas Nicholls, a Republican who strongly defends President Donald Trump, said it's unfair to ask those groups to foot the bill for an immigration crisis that is the responsibility of the federal government.

During an appearance before the House Budget Committee in Washington in June, Nicholls suggested the Federal Emergency Management Agency be tasked with caring for migrants given its experience dealing with people in dire situations.

"The drain of current resources and strain on the community causes a real loss to the community," Nicholls testified.

Show caption Hide caption DEMING, N.M. – Border Patrol vans drop off migrants to Deming's migrant shelter on June 27, 2019, in Deming, New Mexico. Border Patrol often drops... DEMING, N.M. – Border Patrol vans drop off migrants to Deming's migrant shelter on June 27, 2019, in Deming, New Mexico. Border Patrol often drops groups of migrants off at 6 a.m. and 8 p.m. to the shelter, however, the times differ each day, according to shelter organizer Ray Trejo. Annie Rice, USA TODAY Network

Congress set aside $30 million to reimburse border communities as part of a $4.6 billion emergency spending bill passed in July that is mostly going to bolster conditions in federal facilities. But local officials still have no idea how that money will be distributed, or how much of it will actually make its way down to each local government.

During the migrant crisis in 2014, when a wave of unaccompanied minors flooded the southern border, the city of McAllen, Texas, mobilized a massive response to help care for them. The city spent more than $600,000 setting up temporary shelters, installing showers in migrant facilities and helping to transport the migrants, Mayor Jim Darling said.

But after applying for emergency funds through FEMA, the city received only $175,000, or just 29% of what they paid out, and it took several years to receive the first check. Now, as the city's expenses have topped $1.1 million on the current crisis, Darling said he may be faced with some agonizing budget cuts to other city services.

"We don't know how long we could sustain it," he said.

As migrants started showing up this year in Brownsville, Texas, city manager Noel Bernal used the experience of McAllen to warn his city commission about the budgetary headaches they would face if they decided to step in to help the migrants.

"I thought there was zero chance that we would get reimbursed, and whatever chance we had would be years away," Bernal said.

Since then, Brownsville has spent more than $200,000, tapping into the city's reserve fund to help migrants get shelter, food and transportation.

SAN ANTONIO, Texas – A group of migrants board a city van bound for the San Antonio airport outside the San Antonio Migrant Resource Center on June 27, 2019. Courtney Sacco, USA TODAY Network

State assistance could be another option for some cities.

The California Legislature, which is controlled by Democrats, authorized $29 million to help nonprofit organizations caring for migrants. New Mexico Gov. Michelle Lujan Grisham, also a Democrat, announced a state grant program to help compensate cities for the work they've done caring for migrants.

But in the Republican-led capitals of Texas and Arizona, the only funding approved this year was to bolster border security. Texas approved $800 million to provide new technology and equipment for its Department of Public Safety officers manning the border, and Arizona approved funding to hire 48 additional state officers to join the state's Border Strike Force.

Whether additional money eventually comes from Washington or state capitals, or doesn't come at all, Bernal in Brownsville said the money was always a secondary concern.

"The consensus here has been that there really isn't a choice of saying, 'We don't want to get involved,'" Bernal said. "It's the right thing to do for our community and it's the right thing to do as a community."

Contributing: Bart Jansen in Washington, D.C.; Rick Jervis in Austin, Texas; Rebecca Plevin in Palm Springs, California; Rafael Carranza in Phoenix; Aaron Montes in El Paso.

More in this series

One week. Thousands of migrants. A system on the brink of collapse.

How we told the perilous tale of one week in immigration

How poppy farms helped fuel a migrant crisis

Children held by Border Patrol may have PTSD

Here's why 2019's migrant crisis is different

Migrants living in US face long waits, constant surveillance

The next migrant crisis may already be in motion