The U.S. economy slowed slightly in the final months of 2018, returning to a robust but unspectacular pace.

Growth in the final quarter of last year was 2.6 percent, the Commerce Department said Thursday, down from 3.4 percent in the third quarter and an explosive 4.2 percent in the second.

Last year was one of the best for the economy since the financial crisis, partly thanks to a big boost from the GOP tax cuts and a bump in government spending on military and domestic programs.

The White House has predicted a boom for years to come, but most economists say the slowdown will continue.

Growth at the start of this year could fall sharply to around 1 percent, many economists predict, as uncertainty around trade, weak growth abroad and the fallout from the partial government shutdown drag momentum down.

Some see early signs of moderation already in weak retail and housing sales.

“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.”

The consensus is that growth will rebound in the spring to closer to the 2.25 percent average during this expansion, which began in 2009. Odds of a stronger economy will grow if Trump is able to reach an agreement with China to ease trade tensions and the Federal Reserve continues to hold off on raising interest rates.

Already, fears of an imminent recession have faded, especially as companies continue to hire at a rapid rate. U.S. stocks, which tumbled at the end of last year, have rebounded to near all-time highs as Trump has signaled trade talks are going well and the Fed has said it will take a “patient” approach to raising rates.

“The economy has passed the mountaintop, losing some altitude during the final quarter of 2018, but it is not about to crash,” said Sung Won Sohn, president of SS Economics. “The flight path ahead looks quite safe.”

But Trump has made it clear he does not want to settle for normal growth.

The president and his top officials have repeatedly said they can achieve at least 3 percent annual growth for the next decade. Trump predicted, just before the tax cut was enacted in December 2017, that it “could go to 4, 5 and maybe even 6 percent.”

“You’re looking at a country now that’s doing better than ever,” Trump told U.S. troops in Alaska on Thursday in a stop on his way home from Vietnam.

Last year, according to the Commerce Department, the U.S. economy expanded at a 2.9 percent pace. The figure compares average growth for 2018 to average growth for 2017.

The White House and many economists prefer to look at the growth rate derived by calculating the change between the fourth quarter of 2017 and the fourth quarter of 2018. By that metric, the economy grew 3.1 percent last year, meeting Trump’s goal.

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

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

The Fed is predicting 2.3 percent growth this year. The latest Blue Chip forecast from leading private-sector economists is 2.5 percent.

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

Consumer spending continues to power the economy. Business investment also picked up in the final quarter last year, a sign that companies are still hiring and investing because they do not see 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 struggled 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,” said Constance Hunter, chief economist at KPMG. “My main concern is housing investment, which fell for the fourth consecutive quarter. 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. The trade deficit hit $626 billion last year, the Commerce Department said, the largest in a decade.

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, although U.S. Trade Representative Robert E. Lighthizer told Congress on Wednesday that “much still needs to be done.”

Hassett predicted economists will need to revise their forecasts higher for this year once trade negotiations with China wrap up. But many economists are more cautious, sticking with their estimates that growth will be below 2.5 percent this year.

Much will depend on whether American consumers continue to spend and whether businesses keep investing in new technology and factories.

“Growth is slowing, but there is no indication of a recession in 2019,” said Jeff Carbone, managing partner at Cornerstone Wealth.