WASHINGTON — Thousands of new deportation agents deployed into American cities. A doubling of detention space to hold tens of thousands of immigrants before they are expelled. Miles of new border wall, along with surveillance towers equipped with artificial intelligence.

That is the expansive plan that President Donald Trump’s top immigration officials now intend to enact after months of struggling to overcome staffing shortages and logistical hurdles that have stymied his pledge to record the most deportations in American history.

After weeks of pressuring members of Congress into supporting his signature domestic policy legislation, Trump has secured an extraordinary injection of funding for his immigration agenda — $170 billion, the vast majority of which will go to the Department of Homeland Security over four years.

The annual budget of Immigration and Customs Enforcement alone will spike from about $8 billion to roughly $28 billion, making it the highest funded law enforcement agency in the federal government.

The new resources will fuel an intense initiative to recruit as many as 10,000 agents who will have a presence in cities including New York and Los Angeles, and throughout the United States. And the money comes as a windfall for private prison companies, who have rushed to pitch the administration on new contracts to run detention facilities.

“You’re going to see immigration enforcement on a level you’ve never seen it before,” Tom Homan, Trump’s border czar, said in an interview.

The massive infusion of funds is raising worries that in the rush to make good on Trump’s pledged immigration crackdown, his administration could cut corners on the careful vetting needed to hire deportation officers. And immigration advocates say they are bracing for more masked agents to descend upon local communities with heavy-handed tactics.

“There’s an incredible sense of dread, frankly,” said Chris Newman, legal director and general counsel for the National Day Laborer Organizing Network, which represents day laborer groups across the country.

So far, he said, Trump has tried to expand his power over immigration through executive actions, some of which have been blocked by the courts. “But this is legislation, signed into law, and gives people an impression of a sense of permanence, which is ominous,” Newman said. No matter what, the budget increase will leave a Trump imprint on the American immigration system for years to come, according to current and former immigration officials.

“This is the missing piece in mass deportations that the administration needed,” said Andrea Flores, who directed border management for the National Security Council in the Biden White House. “What this signals is a new level of funding for immigration enforcement .”

Even with the new funding, Trump’s aides are still hedging on whether they can deliver on their goal to deport 1 million immigrants lacking legal status this year and millions more before he leaves office. They are aware that it could take months to scale up new detention facilities and recruit, conduct background checks of and train thousands of immigration agents.

“It’s going to take some time,” Homan said. “We’re already about six months in the game. We just got this money, so we’re going to do the best we can.”

The legislation sets aside roughly $30 billion to bolster immigration enforcement through 2029, money that the administration says will fund the hiring of 10,000 ICE agents. That would bring the total number of deportation officers to 16,000.

“You’re going to see more agents on the street,” Homan said, adding that the administration planned to ramp up migrant arrests in cities, in immigration courts and at worksites.

With the surge of agents, he added, the administration could also target more foreigners who overstay their visas,.

Identifying and hiring thousands of qualified agents will not be easy. Some former immigration officials warn that the administration could feel pressure to cut corners on safeguards such as background checks and training to speed the process. When the United States has rushed in the past to surge hiring to federal law enforcement agencies, such as the Bush administration’s quick expansion of the Border Patrol, the government was plagued with cases of misconduct, they noted.

“There’s going to be a lot of people who are ill-suited to be a law enforcement officer and apply for one of these jobs,” said John Sandweg, a former acting director of ICE in the Obama administration.