WASHINGTON (AP) — The U.S. economy expanded at a 2.1% annual pace from April through June, showing continued resilience in the face of higher borrowing costs for consumers and businesses, the government said Wednesday in a downgrade from its initial estimate.

The government had previously estimated that the economy expanded at a 2.4% annual rate last quarter.

The Commerce Department’s second estimate of growth last quarter marked a slight acceleration from a 2% annual growth rate from January through March. Though the economy has been slowed by the Federal Reserve’s strenuous drive to tame inflation with interest rate hikes, it has managed to keep expanding, with employers still hiring and consumers still spending.

Wednesday’s report on the nation’s gross domestic product — the total output of goods and services — showed that growth last quarter was driven by upticks in consumer spending, business investment and outlays by state and local governments. A measure of consumer prices in the report also showed inflation cooling, which could ease the pressure on the Fed to further raise interest rates.

“Lower growth and weaker increases in prices are good news for the Federal Reserve,’’ said Eugenio Aleman, chief economist at Raymond James.

Consumer spending, which accounts for about 70% of the U.S. economy, rose at a 1.7% annual pace in the April-June quarter — a decent gain, though down from 4.2% in the first three months of 2023. Excluding housing, business investment rose at a strong 6.1% annual rate last quarter. Investment in housing, hurt by higher mortgage rates, fell in the second quarter.

The American economy — the world’s largest — has proved surprisingly durable in the midst of the Fed’s aggressive campaign to stamp out a resurgence of inflation, which last year hit a four-decade high. Since March of last year, the Fed has raised its benchmark rate 11 times, making borrowing for everything from cars to homes to business expansions much more expensive and prompting widespread predictions of a coming recession.

Since peaking at 9.1% in June 2022, year-over-year inflation has fallen more or less steadily. Last month, it came in at 3.2% — a significant improvement though still above the Fed’s 2% inflation target. Excluding volatile food and energy costs, so-called core inflation in July matched the smallest monthly rise in nearly two years.

One measure of prices in the GDP report — the personal consumption expenditures index — rose at a 2.5% annual rate last quarter, down from a 4.1% pace in the January-March quarter and the smallest increase since the end of 2020.

Since the Fed began raising rates, the economy has been bolstered by a consistently healthy job market. Employers have added a robust average of 258,000 jobs a month this year, though that average has slowed over the past three months to 218,000.

On Tuesday, a report from the government added to evidence that the job market is gradually weakening: It showed that employers posted far fewer job openings in July and that the number of people who quit their jobs tumbled for a second straight month. (When fewer people quit their jobs, it typically suggests that they aren’t as confident in finding a new one.)

Still, job openings remain well above their pre-pandemic levels. The nation’s unemployment rate, at 3.5%, is still barely above a half-decade low. And when the government issues the August jobs report on Friday, economists polled by the data firm FactSet think it will show that while hiring slowed, employers still added 170,000 jobs.

The combination of tumbling inflation, continued economic growth and slower but steady hiring has raised hopes for a rare “soft landing.” That’s a scenario in which the Fed manages to conquer high inflation without causing a painful recession.

Wednesday’s government report, its second of three estimates of last quarter’s growth, will be followed by a final calculation late next month.