WASHINGTON (MarketWatch)—Americans got out and spent more in the spring, nursing the U.S. economy back to health after a feeble start to the year.

The official scorecard for economy, known as gross domestic product, grew at an annual rate of 2.6% in the second quarter, the government said Friday.

The rebound in GDP more than doubled up on a revised 1.2% pace of growth in the first quarter, suggesting the early-year slowdown largely reflected seasonal quirks such as poor weather and late tax refunds.

The economy has expanded for eight straight years in the wake of the 2007-09 recession, energized by the strongest labor market in years. The U.S. has added 16.6 million new jobs since 2010 to drive the unemployment rate down to a nearly 16-year low of 4.4%.

A vibrant labor market has raised incomes for millions, enabled more Americans to buy homes and fed steady demand for business goods and services. Showing no sign of deterioration, the economy is forecast to grow 2.7% in third quarter.

“The real economy remains in good shape,” said Andrew Hunter, U.S. economist at Capital Economics.

What’s more, inflation slowed dramatically in the second quarter despite an economy running close to full tilt. Long periods of growth typically stoke inflation, but so far that hasn’’t been the case.

U.S. stock markets fell on Friday despite a mostly upbeat GDP report. The Dow Jones Industrial Average DJIA, +0.51% , S&P 500 index SPX, +1.05% and Nasdaq Composite Index COMP, +1.71% all declined.

Inside the report

The economy got a big boost from a rebound in consumer spending, the largest source of the nation’s economic growth.

Spending rose 2.8% in the second quarter as Americans bought more groceries and clothes and paid more for health care. They spent less on new cars and trucks, however.

A smaller lift came from business. Firms increased fixed investment just 2.2% in the spring after a 8.1% gain in the first quarter, when enthusiasm for the new pro-business Trump administration may have triggered a jump in corporate spending.

Companies increased investment in equipment such as computers by 8.2%, though spending on structures such as oil rigs and offices grew more slowly.

In a surprise, corporations reduced inventories for the first time since 2011. The value of newly produced but unsold goods slipped by $300 million after barely any increase in the first quarter.

Home builders also scaled back investment by the most in seven years after piling money into new properties for two quarters in a row.

Residential investment sank 6.8%, partly reflecting weather patterns that led to higher than normal construction in late winter and less home building in the spring.

Although demand is strong, builders also face an array of obstacles in constructing enough new homes to keep up, such as difficulty finding inexpensive lots or skilled workers. Home building appears to have pick up in the summer, however.

U.S. trade relations with other countries, meanwhile, also gave a slight boost to second-quarter GDP. Exports rose twice as fast as imports: 4.2% vs. 2.1%.

Government spending, a laggard during most of the recovery, rose slightly.

Inflation slowed to an annual rate of 0.3% in the second quarter from 2.2% in the first, as measured by the personal-consumption expenditures price index, or PCE.

Price pressures eased sharply in the spring after a rapid buildup in late 2016 and early 2017. The PCE index is the Federal Reserve’s preferred method of gauging inflation. The slowdown in inflation could prompt the central bank to raise interest less aggressively if the trend persists.

