President Biden promised to restore the United States’ reputation as a “beacon for the globe” by reopening the nation’s doors to immigrants and refugees. But he has infuriated some supporters by expelling tens of thousands of migrants, restoring an unlicensed shelter for migrant children and struggling to implement policy changes without a full staff in place.

After barely a month in office, Biden is scrambling to explain to some Democrats that his “Day One” promises for a gentler immigration system will take more time with health and economic crises engulfing the United States.

The risks of an early political backlash for Biden are growing. Former president Donald Trump dispatched his deputies to the Hill on Wednesday to lobby against Biden’s immigration overhauls, and Trump plans to blast those changes in a speech at the Conservative Political Action Conference on Sunday.

An Immigration and Customs Enforcement email obtained by The Washington Post shows that the administration has already entered crisis mode on the southern border.

“We need to prepare for border surges now,” Timothy Perry, ICE’s new chief of staff, wrote in a Feb. 12 email. “We need to begin making changes immediately.”

The Biden administration is so worried about running out of shelter space for teenagers and children who cross the border without their parents that shelters have been authorized to purchase airplane tickets and cover other transportation costs for minors whose relatives are already living in the United States, according to an email from the Department of Health and Human Services’ Office of Refugee Resettlement — which runs the shelters — that was obtained by The Post.

HHS confirmed the policy change late Wednesday.

The White House has yet to announce a nominee for the director of ICE or a commissioner for U.S. Customs and Border Protection, the two most important immigration enforcement jobs.

Building pressures at the border haven’t stopped Biden from reversing Trump’s policies. On Wednesday the White House dumped a Trump order that shut the door to visa holders and other legal immigrants on the grounds that their arrival would hurt the U.S. labor market under strain from the coronavirus pandemic.

The new administration notched a fleeting breakthrough this week when advocates for immigrants agreed to stand down on several crucial lawsuits involving migrant families and unaccompanied children, giving the administration 30 more days to put new policies in place.

“The word I would preach here is patience,” said J. Kevin Appleby, a board member at the Hope Border Institute, an immigrant aid organization in El Paso. “Everyone expects automatic results and automatic change. But it’s going to take time to reverse what Trump did.”

Biden’s 2020 election victory drew cheers from migrants stranded in squalid, freezing refugee camps in Mexico, and some rushed across a bridge in the border city of El Paso while chanting his name. Unlike Trump — whose tough talk of an immigration crackdown led to record-low border crossings in his first months in office — Biden has arrived as the numbers are rising.

And because the Trump administration issued a public-health order effectively blocking migrants from crossing into the United States, Biden inherited an infrastructure ill-prepared to handle a big influx in the middle of the pandemic. Federal agents have taken into custody more than 70,000 migrants a month for each of the past four months, the most for that period in at least 10 years.

A federal lawsuit last year highlighted how quickly the border situation can shift.

In November, U.S. District Judge Emmet G. Sullivan in the District of Columbia blocked the previous administration from immediately expelling children and teenagers who arrived at the southern border without their parents. A trio of Trump-appointed appeals court judges in the D.C. Circuit overturned him in January, but the ruling backed Biden into an uncomfortable corner.

Forced to make the choice, Biden said he would not resume expelling minors. Since then, the number of minors in federal custody has more than tripled to 7,000, prompting officials to reopen an overflow shelter in Texas to house them — even though the shelter is not state-licensed, as required — until officials can place them with a parent or guardian in the United States.

Some Democrats deplored the move, calling for the abolition of ICE and the HHS warehouselike influx shelters.

“This is not okay, never has been okay, never will be okay — no matter the administration or party,” Rep. Alexandria Ocasio-Cortez (D-N.Y.) tweeted.

“We should not go in this direction again,” said Julián Castro, the former presidential candidate and housing secretary during the Obama administration.

But an influx of migrant families — who have far outnumbered unaccompanied children — could create an even more dire situation for the Department of Homeland Security, because they are difficult to house during immigration processing and their cases have clogged the immigration courts. DHS hit a “breaking point” in fiscal 2019 — when more than 500,000 migrant families presented themselves at the southern border, a record high. Unaccompanied minors also hit a record that year, numbering 80,000.

Although immigration agents swiftly deport single adults from the border, the latest DHS statistics show that families and children who are allowed into the United States are virtually guaranteed to stay at least a few years.

Of the more than 1 million migrants who arrived as part of family groups between 2014 and mid-2020, just 6 percent have been returned home, while 4.7 percent have been granted asylum or some form of legal status, DHS data shows. Of the remaining 89 percent whose legal claims remain unresolved, 67 percent had cases pending in U.S. courts, while 20 percent have received deportation orders or an offer of voluntary departure, the statistics show.

Behind the scenes, the administration has made clear in emails and court records that it is gearing up for a much broader influx at the border.

The tone of the Feb. 12 email that Perry sent senior ICE officials was urgent.

DHS Secretary Alejandro Mayorkas told senior officials “to prepare for border surges now,” Perry wrote. “We need to begin making changes immediately. We should privilege action over cost considerations; do what is needed, and the department will work on funding afterward.”

According to Perry’s email, which was first reported by the Washington Times, Mayorkas wants to “reduce pressure on the border” by getting ICE to help transport migrants northward so they can be processed and released.

Officials have also been negotiating with advocates for immigrants to stall lawsuits that officials fear could have triggered a new border surge.

The talks put Biden administration officials in the awkward position of having to defend a Trump order, under Title 42 of the public health code, that allows them to expel migrants from the southern border. In recent court filings, they called the expulsion authority a critical tool in preventing the spread of the coronavirus.

Their worries persuaded the ACLU to agree to a month-long extension in the fight to stop the expulsion of migrant families.

Biden administration officials also persuaded lawyers representing minors in a federal consent decree known as the Flores Settlement Agreement to give them a month before pushing for a new ruling in that case.

White House press secretary Jen Psaki said Wednesday that officials are working quickly to move minors away from the border and are treating them humanely. But she said the administration cannot legally release unaccompanied children to unvetted adults, a past practice that has led to abuses.

She said the children are being transferred from cramped border stations — where some remained longer than the typical 72 hours in recent days because of a major winter storm in Texas — to shelters run by HHS.

“This is a difficult situation, and it’s a difficult choice,” she said. “That’s the choice we’ve made.”

A border influx could imperil the Biden administration’s efforts to pass an immigration bill this year focused on legalizing 11 million undocumented immigrants — many of whom have lived in the United States for years, even decades.

Stephen Miller — the architect of Trump’s immigration strategy — briefed GOP lawmakers this week on the Biden administration’s immigration changes and urged them to continue hammering away at the issue, which he said could help Republicans in the midterm elections next year. Miller told them that the Democrats’ 2010 midterm defeats were the result of President Barack Obama focusing on health-care reform instead of economic issues.

“If you think Obama focusing on health care during the recession was a misalignment of priorities, that is nothing compared to opening America’s borders and shutting down enforcement during an economically ravaging pandemic,” Miller said in an interview. “From a purely political standpoint, this is a recipe for Democrats to have an historic drubbing in the midterms if we can make it even as big an issue or bigger than Obamacare.”

Cecilia Muñoz, a former domestic policy adviser to Obama, said Biden faces a “minefield” on immigration policy, but he still needs to find a solution.

“It is absolutely worth the fight,” she said. “The country is really tired of a system that doesn’t work. I believe most Americans want to get this done and want to get it behind us.”