WASHINGTON (AP) — The U.S. economy surprisingly accelerated to a 2.4% annual growth rate from April through June, showing continued resilience in the face of steadily higher interest rates resulting from the Federal Reserve’s 16-month-long fight to bring down inflation.

The gross domestic product — the economy’s total output of goods and services — picked up from the 2% growth rate in the January-March quarter.

Last quarter’s expansion was well above the 1.5% annual rate that economists had forecast.

Driving the gain was a burst of business investment, which surged at a 5.7% annual pace, the fastest rate since late 2021.

Companies plowed more money into factories and equipment.

Increased spending by state and local governments also helped fuel growth.