The U.S. economy expanded at a strong 3 percent rate this summer, advancing President Trump's goal of faster economic growth and potentially providing a tail wind to Republican efforts to overhaul the tax code.

The robust pace of economic growth defied analysts' expectations that activity might slow in the third quarter, from July through September, because of Hurricane Harvey. The economy had grown at a 3.1 percent pace in the spring as business activity picked up and the global economy showed increasing signs of strength.

[House narrowly passes budget, paving way for $1.5 trillion tax cut]

Combined with a strong labor market and record highs in the stock market — the Standard & Poor's 500-stock index is up 15 percent year-to-date — the economy is proving to be an ally of a president who is otherwise suffering from unusually low approval numbers and facing a wide range of political conflicts.

Trump and his allies in Congress are making the case that passing a tax overhaul — one that aims to cut income and corporate taxes by $1.5 trillion over a decade — is critical to continuing the economic expansion. House Republicans plan to unveil a bill Wednesday on the tax code, and both chambers plan to pass bills by Thanksgiving, an extremely tight deadline for a major piece of legislation.

"Working with President Trump and the Senate, we will deliver on our tax reform promise this year — ushering in a new era of growth for the American people," House Ways and Means Committee Chairman Kevin Brady (R-Tex.) said in a statement Friday.

Yet the resiliency of the economy also underscores the high stakes of the effort and what any slowdown in growth, or decline in the stock market, might mean for the president and Republicans politically.

"A good portion of people voted for Trump because they were unhappy with their individual economic plight," said Barbara Perry, director of presidential studies at the University of Virginia's Miller Center. "They expect their lot in life to improve."

Few economists predict the economy will continue to expand at 3 percent growth in coming quarters, given the waves of baby boomers retiring and exiting the workforce. Under President Barack Obama, the economy grew an average of 2.1 percent a year, although he also had many ­quarters where growth exceeded 3 percent.

On the campaign trail, Trump repeatedly promised growth of over 4 percent, which has not happened consistently since the late 1990s.

"An above-trend quarter does not mean that the trend has picked up," said Jim O'Sullivan, chief U.S. economist at High Frequency Economics.

Some — including in the White House — argue that the stock market and businesses might already be pricing in a substantial tax cut, meaning failure to deliver could lead to a pullback in performance.

In earnings calls this week, over a dozen chief executives of major companies such as AT&T and UPS sounded upbeat that Congress will enact a tax package. Some had gone as far as to project how much their earnings would rise next year and what they would do with the extra cash.

"If we get tax reform, that gives us greater access to our offshore cash, that will allow us to invest more in the U.S., and it will also allow us to be able to return more cash to shareholders," Richard Gonzalez, CEO of the drug company AbbVie, said on an earnings call Friday.

Christopher J. Nassetta, CEO of Hilton, said Thursday that he was "much more optimistic this quarter" that business taxes will go down and that as soon as Congress passes the bill, the benefits will "start to flow through pretty quickly."

Treasury Secretary Steven Mnuchin recently warned Congress that the stock market would see a "significant" drop if the tax package did not pass. The White House reiterated that message Friday.

"Firms are optimistic because of regulatory reform but also because they expect corporate tax reform," Kevin Hassett, chair of Trump's Council of Economic Advisers, said on a call with reporters. "The thing I'm worried about is if those expectations prove to be incorrect, I would expect business fixed investment to go back to its disappointing past and markets to go down as well."

The United States is on track for a history-making expansion. If the current growth cycle lasts until May 2018, as most economists predict, it will be the second-longest expansion in U.S. history, according to Lakshman Achuthan, co-founder of the Economic Cycle Research Institute. If it lasts until July 2019, it would surpass the 1991-2001 expansion as the longest.

"Some people may think we are in the seventh or eighth inning of this expansion, but in the business-cycle game, there is no fundamental reason an economic expansion cannot last for 20 innings or longer," Achuthan said.

There's a heated debate among economists over how much Trump's tax plan, which is being finalized now, will bump up growth. The Trump administration says tax cuts will lead to a large uptick, so much so that the economy will grow more than 3 percent a year, which hasn't happened since 2005.

"I expect the impact on GDP growth will be muted," Megan Greene, chief economist at Manulife Asset Management, wrote in a note Friday. She predicted the Republican tax package will lead companies to mostly buy back more stock and hike dividends, a boon to Wall Street that would not do much for Main Street.

Goldman Sachs forecasts only a modest increase of 0.1 to 0.2 percentage points in economic growth if Congress passes the tax bill. The Wall Street bank also cautions that growth depends not just on what Congress and the White House do but also the Federal Reserve. After years of stimulative low interest rates, the Fed is beginning to lift rates, which is akin to tapping the brakes on the economy.

"This tail wind is unlikely to persist as the Fed continues to tighten," Goldman warned in its weekly kick-start newsletter this week.

[Trump considers big shift at Fed as he faces pressure to appoint a Republican]

Trump is about to select the next Fed chair, the most powerful economic policy position in the United States. He is debating between reappointing Chair ­Janet L. Yellen, an advocate of low rates to help growth and jobs, or nominating someone such as Stanford University economist John Taylor, who favors raising interest rates faster.

The leading candidates for the job are Yellen, Taylor and Jerome Powell, who is a Fed governor and seen as someone likely to continue many of Yellen's low-rate policies.

Opinions vary greatly over whether Trump should take credit for the recent uptick in growth.

"He gets zero credit because he hasn't done anything. There's been zero change in economic policy," said Mark Zandi, chief economist at Moody's Analytics, a research firm. "This uptick is happening across the globe. It's not just the U.S."

Conservatives, however, point out that Trump has dramatically scaled back regulations on businesses and say that is helping to spur more corporate spending.

"It's striking how much has been done on the regulatory front. It has to matter to the economy," said economist Doug Holtz-Eakin, president of the right-leaning American Action Forum.