Even two devastating hurricanes can’t hold down the resurgent U.S. economy.

While Hurricanes Harvey and Irma dampened housing construction, the economy grew briskly in the third quarter as business stockpiling and consumer spending picked up the slack.

The nation’s gross domestic product — the value of all goods and services produced in the U.S. — increased at a seasonally adjusted annual rate of 3%, following a 3.1% increase in the second quarter, the Commerce Department said Friday. Economists expected 2.6% growth.

It marks the first time growth topped 3% for two straight quarters since mid-2014.

"This is a very solid performance, given the disruption caused by Hurricanes Harvey and Irma," economist Ian Shepherdson of Pantheon Macroeconomics wrote in a note to clients.

The storms no doubt curtailed the gains. Economists expected the hurricanes to shave at least half a percentage point off growth in the July-September period. But the 3% pace still soundly exceeds the tepid 2.2% average for the eight-year-old recovery. And economists are forecasting an offsetting increase in output in the fourth quarter as construction crews repair hurricane-related damage and consumers make purchases they deferred because of the storms.

Hurricane Harvey slammed into the Houston area in late August and Irma tore through Florida in early September.

The economy seems to be on an upward trajectory nonetheless. It grew at a 3.1% rate in the second quarter, the fastest in more than two years. That offset an anemic 1.2% advance early in 2017 that many analysts chalked up to measurement problems, leaving gains for the first half of the year in line with the recovery average.

In the third quarter, consumer spending increased 2.4%, a slowdown from the 3.1% rise in the second quarter but a sturdy showing in light of the hurricanes, which kept many of those affected from venturing out. Solid job and income gains, cheap gasoline and low household debt are prodding Americans to open their wallets. Outlays could pick up further in the current quarters as some people in areas hit by the hurricanes replace damaged vehicles.

Business investment rose 3.9% after roughly 7% gains the prior two quarters as spending on structures fell 5.2%, likely as a result of the storms. But spending on equipment surged 8.6%, in line with the previous quarter.

And business stockpiling contributed 0.73 percentage points to growth as companies replenished inventories to meet customer demand.

Trade also was a positive as an improving global economy bolstered exports while imports fell, possibly because of storm-related delays. That could lead to stronger imports that ding growth in the current quarter.

Residential investment, however, fell 6%, its second straight decline, amid the hurricanes, as well as shortages of construction workers and lots. Rebuilding in the hurricane zones could boost home building in the current quarter.

Overall, the strong showing keeps the Federal Reserve on track to raise interest rates in December for the the third time this year, says Barclays economist Michael Gapen.

Many experts say growth could approach 3% both in the fourth quarter -- as a result of a hurricane-related rebound -- and in 2018 if Congress passes President Trump’s proposed tax cut package. Trump has promised 3% growth, but his tax cuts are jeopardized by Republican discord over the details. And some economists believe that with unemployment at a low 4.2%, his fiscal stimulus would stoke inflation and force the Fed to raise interest rates more sharply, tempering any economic benefits.

This was the first estimate of third-quarter growth. The government will publish two revised estimates in coming months.