WASHINGTON — The U.S. economy grew at a solid 3.2 percent annual rate in the first three months of the year, a far better outcome than expected, overcoming a host of headwinds including global weakness, rising trade tensions and a partial government shutdown.

The advance in the gross domestic product, the broadest measure of economic health, marks an acceleration from a 2.2 percent gain in the previous October-December period, the Commerce Department reported Friday. However, about half the gain reflected two factors not expected to last — a big jump in stockpiling by businesses and a sharp contraction in the trade deficit.

Still, the GDP gain surpassed the 3 percent bar set by President Donald Trump as evidence his economic program is working. Trump is counting on a strong economy as he campaigns for re-election.

In a tweet, Trump called the 3.2 percent growth "far above expectations." Speaking to reporters before leaving Washington for a speech to the National Rifle Association, Trump termed the GDP figure an "incredible number" and said, "Our economy is doing great. Number One in the world."

It was the strongest first quarter growth rate since 2015. In recent years, GDP has been exceptionally weak in the first quarter. There had been fears growth could dip below 1 percent this year due to a variety of adverse factors such as the December stock market nose-dive, rising weakness in key economies overseas, the U.S. trade war with China and a 35-day partial government shutdown that ended in January.

But the economy shrugged off those concerns, helped by an announcement in early January from the Federal Reserve that after raising rates four times last year, it was declaring a pause on further rate hikes. That spurred a stock market rebound by easing concerns that the central bank might overdo its credit tightening and send the country into a recession.

In the first quarter, inventory rebuilding added 0.7 percentage point to growth, while a falling trade deficit boosted growth by a full percentage point. Analysts think both of those factors will reverse in the current quarter. Analysts at Macroeconomic Advisers said they expect GDP will slow to a 1.8 percent rate in the second quarter.

"The drivers of growth in the first quarter are unlikely to persist," said Gus Faucher, chief economist at PNC.

But Larry Kudlow, head of the president's National Economic Council, said the administration is sticking with its estimate for growth above 3 percent this year, believing that low unemployment and solid wage gains will give a boost to consumer spending, which slowed in the first quarter.

Kudlow predicted that the income growth will lead to a rebound in car sales and also help lift housing, which has been struggling over the past year.

"I think the prosperity cycle is intact," Kudlow said in a CNBC interview. "I think the Trump policies are working to rebuild America and people are getting happier and happier."

Consumer spending, which accounts for 70 percent of economic activity, slowed to growth at a rate of just 1.2 percent in the first quarter. In particular, spending on durable goods fell at a rate of 5.3 percent, the biggest decline in a decade, led by a sharp drop in light truck sales.

Government spending was up 2.4 percent as a big 3.9 percent gain in state and local spending, reflecting increases in highway construction, offset a flat performance for the federal government. The government estimated that the 35-day partial federal shutdown trimmed 0.3 percentage point from growth in the first quarter after trimming fourth quarter growth by 0.1 percentage point.

For the year, economists believe GDP will expand 2.4 percent, down from last year's 2.9 percent gain, as the boost from the 2017 tax cuts and increased government spending over the past two years start to fade.

The consensus view of private forecasters is well below expectations of the Trump administration which contends that its economic policies have broken a decadelong period when GDP gains averaged 2.2 percent annually. The administration is predicting growth will top 3 percent in coming years.

There are factors that could help lift growth in coming quarters. The global economy appears on better footing, given improvements in such major economies as China, and a trade war between the world's two largest economies that appears closer to being resolved than it did at the start of the year.

Mark Zandi, chief economist at Moody's Analytics, said he expects growth for this year to be around 2.2 percent, close to the average for the past 10 years.

"We got a temporary boost to growth last year because of the tax cuts but that money has been spent so we are back to the kind of growth we have had," Zandi said. "I think we are back to the 2 percent world we have been in since the recession ended."

The current recovery from the Great Recession of 2007-2009 is currently the second longest in history and will become the longest if it lasts past June.

But it has also been the slowest in the post-World War II period, a development economists attribute to slower growth in the labor force and weak gains in productivity.

More than 100 women have been found dead outside on Long Island since 1976. NewsdayTV's Shari Einhorn and Newsday investigative reporter Sandra Peddie have this exclusive story. Credit: Newsday Staff

'We have to figure out what happened to these people'  More than 100 women have been found dead outside on Long Island since 1976. NewsdayTV's Shari Einhorn and Newsday investigative reporter Sandra Peddie have this exclusive story.

More than 100 women have been found dead outside on Long Island since 1976. NewsdayTV's Shari Einhorn and Newsday investigative reporter Sandra Peddie have this exclusive story. Credit: Newsday Staff

'We have to figure out what happened to these people'  More than 100 women have been found dead outside on Long Island since 1976. NewsdayTV's Shari Einhorn and Newsday investigative reporter Sandra Peddie have this exclusive story.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME