In a show of resilience, the U.S. economy grew at a solid pace in the latest quarter despite the impact of the hurricanes in Texas and Florida.

The nation's gross domestic product, a key indicator of economic strength, expanded at an annual rate of 3 percent in the third quarter, the Commerce Department reported Friday. The strong numbers could buoy President Donald Trump and congressional Republicans as they continue their push to cut tax rates and overhaul the tax code.

Economists initially expected that hurricanes Harvey and Irma would deal a blow to the country's steady growth but became more ­optimistic in recent weeks.

The destruction wrought by the storms was outweighed by the continued spending of consumers and businesses. The job market is lively, and the stock market has rallied to record highs. Chief executives and consumers are more confident than they have been in more than a decade, recent surveys show.

"There are no real headwinds to growth for the first time since the expansion began," said Mark Zandi, chief economist of Moody's Analytics. "We are at full employment, and we are in full swing. Let the good times roll."

Some Republicans are pointing to the expansion as proof that tax cuts could push the growth rate above 3 percent for years to come — and that just the prospect of that happening is having an effect.

Trump made economic growth a political flash point during his campaign and has continued to do so since taking office, promising to reach heights that eluded his ­predecessor.

"On a yearly basis, as you know, the last administration, during an eight-year period, never hit 3 percent," Trump said during a speech in Missouri in August. Touting a strong quarter in the spring, when growth hit 3.1 percent, the president suggested that "we're really on our way" to sustaining that speed ­year-round.

The economy is experiencing its fastest growth spurt in two consecutive quarters since 2014, but economists said it is highly unlikely that growth for the year will reach 3 percent. The first quarter was tepid, and projections for the current quarter hover around 2.8 percent.

The figures released Friday also highlight the fine line Republicans are walking in selling their tax policy: They are celebrating faster growth while claiming tax reform is needed to accelerate it further.

Rep. Kevin Brady, chairman of the House Ways and Means Committee, said Friday that the Commerce Department data "reinforces the resilience of the American people." Republicans, he added, "will deliver on our tax reform promise this year — ushering in a new era of growth."

Kevin Hassett, chairman of the White House Council of Economic Advisers, asserted Friday that companies were investing more, and driving growth higher, in expectation of a tax cut. Failing to pass a tax bill, he said, would cause growth to slump and markets to tumble.

"If you look at the GDP data, it's clear that is a major reason why capital spending has increased," he said, referring to expectations of a tax cut. "If those expectations appear to be incorrect, I would expect capital spending to go back into decline."

For now, economists are reluctant to give Congress or Trump too much credit for the economy's ­trajectory.

"There hasn't been anything concrete in terms of spending or tax cuts that we can point to that's fueling the acceleration," said Scott Anderson, chief economist at Bank of the West in San Francisco. If anyone deserves credit for the good news, he said, it's Federal Reserve Chairwoman Janet Yellen.

Yellen, whose four-year term ends in February, has pursued gradual increases of the Fed's benchmark interest rate in an effort to steer the economy toward steady growth without overheating. The Fed is expected to raise rates when it meets in December. Trump is publicly weighing whether to replace Yellen, considering two possible successors, but has also signaled that he may renominate her.

"Markets would probably applaud her reappointment," Anderson said.

Personal consumption, although down from the ­previous quarter, grew at a 2.4 percent rate, and nonresidential fixed investment, a measure of business spending, expanded at a robust rate of 3.9 percent. Zandi said the numbers were "a sign that consumers are hanging tough."

At the same time, with a weak dollar making U.S. goods more competitive abroad, international trade contributed positively to output for the third quarter in a row. Imports decreased.

Spending on equipment increased at a rate of 8.6 percent, as companies poured money into capital improvements. Businesses may be investing in computers and industrial equipment in response to a tight labor ­market and rising wages, economists said.

"Businesses are going to be looking for more ways to produce than just adding bodies," Anderson said.

Hurricanes can disrupt an economy in obvious ways — ruining homes, incapacitating infrastructure and slowing the flow of goods. But after the negative shock, the recovery can help the economy by creating new reasons for consumer spending, which represents roughly 70 percent of national output.

Hurricanes Harvey and Irma left 600,000 to 1 million vehicles needing replacement, according to Cox Automotive, and Americans rushed to recoup what they had lost. Car sales spiked in September, reaching their highest level since 2005.