U.S. President Donald Trump gestures as artificial snow falls during his address to supporters at a Make America Great Again rally in Biloxi, Mississippi, on November 26, 2018. (Kevin Lamarque/Reuters).

The U.S. economy expanded at a 2.9 percent pace last year, the Commerce Department reported Thursday, a strong rate but just shy of President Trump’s goal of 3 percent.

Last year’s growth marked the fastest gain for the economy since 2015, according to official government data. The economy received a big boost from the largest corporate tax cut in U.S. history that went into effect last year, as well as additional government spending on military and domestic programs. But that stimulus is widely expected to wear off later this year, causing growth to slow.

Growth in the final quarter of last year was 2.6 percent, above forecasts but below the 3.4 percent pace in the third quarter and 4.2 percent pace in the second quarter. Consumer and business spending were both strong, but Americans bought a little less than they did earlier in the year.

“Last year was likely the best year of this business cycle,” said Ellen Zentner, chief economist at Morgan Stanley. “We stimulated the heck out of the economy last year and that stimulus will fade this year.”

Trump and his top officials have repeatedly said they can achieve at least 3 percent annual growth for the next decade with the president even claiming it “could go to 4, 5, and maybe even 6 percent" as Republicans put the final touches on the tax cut bill in late 2017.

The White House says it achieved its goal because the growth rate for the fourth quarter of 2018 is 3.1 percent above the fourth quarter of the prior year. The Commerce Department calculation compares the average growth for 2018 to the average growth in 2017.

“Our policies are working,” said Kevin Hassett, head of Trump’s Council of Economic Advisors. “We said there would be a capital spending boom and we would get 3.1 percent growth. That is what happened."

There’s heavy debate among economists about which measure is preferable. Using the White House’s preferred method means last year was the strongest for economic growth since before the recession.

Hassett said the White House remains “confident” that “2019 will be another 3 percent year.”

The vast majority of economists predict growth will be lower this year. The Federal Reserve is currently predicting 2.3 percent growth for 2019. Fed vice chair Richard Clarida said Thursday morning that he is likely to lower his forecast as headwinds overseas in Europe and China could drag down growth at home.

“While my baseline outlook for growth, employment, and inflation is a positive one, a number of crosscurrents that are buffeting the economy bear careful scrutiny,” Clarida said, noting that some recent economic data has been disappointing.

The Commerce Department had to delay this report because of the partial government shutdown that furloughed many employees who work on key economic data collection and calculation.

Consumer spending continues to power the economy with Americans opening their wallets on a wide range of purchases. Business investment also picked up in the final quarter last year, a sign that companies are still hiring and investing because they do not foresee a recession on the horizon.

There were especially strong gains in intellectual property and equipment purchases, but spending on residential homes declined 3.5 percent. The home building industry has continued to struggle with rising interest rates dissuading buyers and higher costs for some materials because of Trump’s tariffs.

“The consumer is trending lower, though consumption is still strong. My main concern is housing investment which fell for the fourth consecutive quarter," said Constance Hunter, chief economist at KPMG. "If this continues into 2019, it will be a worrying signal for future growth. "

​Trade was a drag on growth at the end of last year as imports heavily exceeded exports, meaning Americans brought more foreign products than they sold. There was a rush earlier in the year to sell U.S. soybeans and other products to China before Trump’s tariffs went into effect, but that trend has now reversed.

Trump and many top aides have sounded optimistic that there will soon be an agreement with China to end the trade dispute. Stocks have rallied and are back near an all-time high reached in late September as trade news has improved and the Fed announced a pause in interest rate increases.

Hassett predicted economists will likely need to revise their forecasts higher for this year once trade negotiations with China wrap up. But many economists remain more cautious, although they don’t see an imminent recession. Much will depend on whether American consumers continue to spend and whether businesses keep investing in new technology and factories.

“As we look ahead to 2019, there are good reasons to expect growth not to be as strong, but I don’t anticipate growth collapsing,” said Jim O’Sullivan, chief U.S. economist at High Frequency Economics.

Related:

Fed chair Powell predicts no recession in 2019

Treasury to run out of money in September unless Congress acts, CBO says

Why Warren Buffett remains bullish on the stock market