MIAMI (AP) — Having fled economic and political chaos in Venezuela, Luisana Silva now loads carpets for a South Carolina rug company. She earns enough to pay rent, buy groceries, gas up her car — and send money home to her parents.

Reaching the United States was a harrowing ordeal. Silva, 25, her husband and their then-7-year-old daughter braved the treacherous jungles of Panama’s Darien Gap, traveled the length of Mexico, crossed the Rio Grande and then turned themselves in to the U.S. Border Patrol in Brownsville, Texas. Seeking asylum, they received a work permit last year and found jobs in Rock Hill, South Carolina.

“My plan is to help my family that much need the money and to grow economically here,” Silva said.

Her story amounts to far more than one family’s arduous quest for a better life. The millions of jobs that Silva and other new immigrant arrivals have been filling in the United States appear to solve a riddle that has confounded economists for at least a year:

How has the economy managed to prosper, adding hundreds of thousands of jobs, month after month, at a time when the Federal Reserve has aggressively raised interest rates to fight inflation — normally a recipe for a recession?

Increasingly, the answer appears to be immigrants — whether living in the United States legally or not. The influx of foreign-born adults vastly raised the supply of available workers after a U.S. labor shortage had left many companies unable to fill jobs.

More workers filling more jobs and spending more money has helped drive economic growth and create still-more job openings. The availability of immigrant workers eased the pressure on companies to sharply raise wages and to then pass on their higher labor costs to their customers via higher prices that feed inflation. Though U.S. inflation remains elevated, it has plummeted from its levels of two years ago.

“There’s been something of a mystery — how are we continuing to get such extraordinary strong job growth with inflation still continuing to come down?’’ said Heidi Shierholz, president of the Economic Policy Institute and a former chief economist at the Labor Department. “The immigration numbers being higher than what we had thought — that really does pretty much solve that puzzle.’’

While helping fuel economic growth, immigrants also lie at the heart of an incendiary election-year debate over the control of the nation’s Southern border. In his bid to return to the White House, Donald Trump has attacked migrants in often-degrading terms, characterizing them as dangerous criminals who are “poisoning the blood” of America and frequently invoking falsehoods about migration. Trump has vowed to finish building a border wall and to launch the “largest domestic deportation operation in American history.” Whether he or President Joe Biden wins the election could determine whether the influx of immigrants, and their key role in propelling the economy, will endure.

The boom in immigration caught almost everyone by surprise. In 2019, the Congressional Budget Office had estimated that net immigration — arrivals minus departures — would equal about 1 million in 2023. The actual number, the CBO said in a January update, was more than triple that estimate: 3.3 million.

Thousands of employers desperately needed the new arrivals. The economy — and consumer spending — had roared back from the pandemic recession. Companies were struggling to hire enough workers to keep up with customer orders.

The problem was compounded by demographic changes: The number of native-born Americans in their prime working years — ages 25 to 54 — was dropping because so many of them had aged out of that category and were nearing or entering retirement. This group’s numbers have shrunk by 770,000 since February 2020, just before COVID-19 slammed the economy.

Filling the gap has been a wave of immigrants. Over the past four years, the number of prime-age workers who either have a job or are looking for one has surged by 2.8 million. And nearly all those new labor force entrants — 2.7 million, or 96% of them — were born outside the United States. Immigrants last year accounted for a record 18.6% of the labor force, according to the Economic Policy Institute’s analysis of government data.

And employers welcomed the help.

Consider Jan Gautam, CEO of the lodging company Interessant Hotels & Resort Management in Orlando, Florida, who said he can’t find American-born workers to take jobs cleaning rooms and doing laundry in his 44 hotels. Of Interessant’s 3,500 workers, he said, 85% are immigrants.

“Without employees, you are broken,” said Gautam, himself an immigrant from India who started working in restaurants as a dishwasher and now owns his own company.

“If you want boost the economy,” he said, “it definitely needs to have more immigrants coming out to this country.”

Or consider the workforce of the Flood Brothers farm in Maine’s “dairy capital’’ of Clinton. Foreign-born workers make up fully half the farm’s staff of nearly 50, feeding the cows, tending crops and helping collect the milk — 18,000 gallons each day.

“We cannot do it without them,” said Jenni Tilton-Flood, a partner in the operation.

For every unemployed person in Maine, after all, there are two job openings, on average.

“We would not have an economy, in Maine or in the U.S. if we did not have highly skilled labor that comes from outside of this country,” Tilton-Flood said in a phone interview with The Associated Press from her farm.

“Without immigrants — both new asylum-seekers as well as our long-term immigrant contributors — we would not be able to do the work that we do,” she said. “Every single thing that affects the American economy is driven by and will only be saved by accepting immigrant labor.”

A study by Wendy Edelberg and Tara Watson, economists at the Brookings Institution’s Hamilton Project, has concluded that over the past two years, new immigrants raised the economy’s supply of workers and allowed the United States to generate jobs without overheating and accelerating inflation.

In the past, economists typically estimated that America’s employers could add no more than 60,000 to 100,000 jobs a month without overheating the economy and igniting inflation. But when Edelberg and Watson included the immigration surge in their calculations, they found that monthly job growth could be roughly twice as high this year — 160,000 to 200,000 — without exerting upward pressure on inflation.

“There are significantly more people working in the country,” Fed Chair Jerome Powell said last week in a speech at Stanford University. Largely because of the immigrant influx, Powell said, “it’s a bigger economy but not a tighter one. Really an unexpected and an unusual thing.’’

Trump has repeatedly attacked Biden’s immigration policy over the surge in migrants at the Southern border. Only about 27% of the 3.3 million foreigners who entered the United States last year did so through as “lawful permanent residents’’ or on temporary visas, according to Edelberg and Watson’s analysis. The rest — 2.4 million — either came illegally, overstayed their visas, are awaiting immigration court proceedings or are on a parole program that lets them stay temporarily and sometimes work in the country.

“So there you have it,’’ Douglas Holtz-Eakin, a former CBO director who is president of the conservative American Action Forum, wrote in February. “The way to solve an inflation crisis is to endure an immigration crisis.”

Many economists suggest that immigrants benefit the U.S. economy in several ways. They take generally undesirable, low-paying but essential jobs that most U.S.-born Americans won’t, like caring for children, the sick and the elderly. And they can boost the country’s innovation and productivity because they are more likely to start their own businesses and obtain patents.

Ernie Tedeschi, a visiting fellow at Georgetown University’s Psaros Center and a former Biden economic adviser, calculates that the burst of immigration has accounted for about a fifth of the economy’s growth over the past four years.

Critics counter that a surge in immigration can force down pay, particularly for low-income workers, a category that often includes immigrants who have lived in the United States longer. Last month, in the most recent economic report of the president, Biden’s advisers acknowledged that “immigration may place downward pressure on the wages of some low-paid workers” but added that most studies show that the impact on the wages of the U.S.-born is “small.”

Even Edelberg notes that an unexpected wave of immigrants, like the recent one, can overwhelm state and local governments and saddle them with burdensome costs. A more orderly immigration system, she said, would help.

The recent surge “is a somewhat disruptive way of increasing immigration in the United States,” Edelberg said. “I don’t think anybody would have sat down and said: ‘Let’s create optimal immigration policy,’ and this is what they would come up with.”

Holtz-Eakin argued that an immigration cutoff of the kind Trump has vowed to impose, if elected, would result in “much, much slower labor force growth and a return to the sharp tradeoff’’ between containing inflation and maintaining economic growth that the United States has so far managed to avoid.

For now, millions of job vacancies are being filled by immigrants like Mariel Marrero. A political opponent of Venezuela’s authoritarian President Nicolás Maduro, Marrero, 32, fled her homeland in 2016 after receiving death threats. She lived in Panama and El Salvador before crossing the U.S. border and applying for asylum.

Her case pending, she received authorization to work in the United States last July. Marrero, who used to work in the archives of the Venezuelan Congress in Caracas, found work selling telephones and then as a sales clerk at a convenience store owned by Venezuelan immigrants.

At first, she lived for free at the house of an uncle. But now she earns enough to pay rent on a two-bedroom house she shares with three other Venezuelans in Doral, Florida, a Miami suburb with a large Venezuelan community. After rent, food, electricity and gasoline, she has enough left over to send $200 a month to her family in Venezuela.

“One hundred percent — this country gives you opportunities,’’ she said.

Marrero has her own American dream:

“I imagine having my own company, my house, helping my family in a more comfortable way.”

___

Wiseman and Rugaber reported from Washington, Salomon from Miami.