WASHINGTON (AP) — America’s employers shrugged off high inflation and weakening growth to add 372,000 jobs in June, a surprisingly strong gain that will likely spur the Federal Reserve to keep sharply raising interest rates to cool the economy and slow price increases.

The unemployment rate in June remained at 3.6% for a fourth straight month, the Labor Department said Friday, matching a near-50-year low that was reached before the pandemic struck in early 2020.

The past year’s streak of robust hiring has been good for job seekers and has led to higher pay for many employees. But it has also helped fuel the highest inflation in four decades and heightened pressure on the Fed to further slow borrowing and spending.

Many employers are still struggling to fill jobs, especially in the economy’s vast service sector, with Americans now traveling, eating out and attending public events with much greater frequency. The Fed may regard the June job gain as evidence that the rapid pace of hiring is feeding inflation as companies raise pay to attract workers and then increase prices to cover their higher labor costs.

The Fed has already embarked on its fastest series of rate hikes since the 1980s, and further large increases would making borrowing much costlier for consumers and businesses and increase the risk of a recession.

The persistent desire of many businesses to hire and grow is providing a bulwark against the likelihood that the economy will tip into recession over the next year. Even if a downturn does occur, the healthy job and pay growth of the past year could help keep it relatively brief and mild.

For now, there are roughly two posted job openings for every unemployed worker. And the number of people seeking unemployment benefits — a proxy for layoffs and an early indicator of a downturn — remains far below historic averages, although it has ticked up recently.

At the same time, economic growth has been negative for two straight quarters, consumers are slowing their spending with inflation at a four-decade high and home sales have fallen as the Fed has jacked up borrowing costs.

And hiring could weaken in the coming months. The Fed wants job growth to slow, at least modestly, as part of its strenuous efforts to cool the economy and curb high inflation. The Biden administration, too, has sought to portray any pullback in hiring as part of a welcome transition to a more sustainable economy that will help keep inflation down.

But the transition to a more sustainable pace of growth and hiring is likely to be a bumpy one. If, for example, the Fed’s rate cuts end up slowing growth too much, as many analysts fear, the economy could slide into a recession by next year. Already, signs of a slowdown are evident. In May, consumer spending, adjusted for inflation, fell for the first time since December. Sales of existing homes have fallen nearly 9% compared with a year ago.

And some companies are announcing layoffs, or have paused hiring. In particular, several large retailers, including Walmart and Amazon, have said they over-hired during the pandemic, with Walmart reducing its headcount by attrition.

Tesla is cutting about 3.5% of its total headcount. Netflix has laid off about 450 employees after it reported losing subscribers for the first time in more than a decade. The online automotive retailer Carvana and real estate companies Redfin and Compass have also announced job cuts.

Fed Chair Jerome Powell has held out hope that the economy will continue to expand even as the central bank raises borrowing costs at its fastest pace since the late 1980s. But Powell has also acknowledged that overseas factors, such as Russia’s invasion of Ukraine, which has elevated gas and food prices, will make it difficult to avoid a recession.

Last month, he conceded that a recession “is not our intended outcome but it’s certainly a possibility.”

The job market has recovered much more rapidly from the pandemic recession than it did after previous downturns.

President Joe Biden released the following statement:

“Today, we learned that our private sector has recovered all of the jobs lost during the pandemic, and added jobs on top of that. This has been the fastest and strongest jobs recovery in American history, and it would not have been possible without the decisive action my Administration took last year to fix a broken COVID response, and pass the American Rescue Plan to get our economy back on track.

In the second quarter of this year, we created more jobs than in any quarter under any of my predecessors in the nearly 40 years before the pandemic. We have more Americans working in the private sector today than any day during Donald Trump’s Presidency – more people than any time in our history.

The historic strength of our job market is one reason our economy is uniquely well positioned to tackle a range of global economic challenges – from global inflation to the economic fallout from Putin’s war. No country is better positioned than America to bring down inflation, without giving up all of the economic gains we have made over the last 18 months.

Of course, having added a record number of new jobs, and achieved historically low levels of unemployment, additional job growth from this strong position will be slower. That is not a bad thing, because our economy should move to stable growth for the years ahead.

The best way to achieve that goal is for Congress to pass legislation that lowers costs for families – from prescription drugs to utility costs – while reducing the federal budget deficit, in addition to passing the Bipartisan Innovation Act.”