WASHINGTON — U.S. economic growth slowed in the final three months of 2014 as a big burst in consumer spending was offset by weakness in other areas.

The Commerce Department said Friday gross domestic product grew at a 2.6 percent annualized rate in the October-December period, down from sizzling gains of 5 percent in the third quarter and 4.6 percent in the second quarter.

Consumers did their part in the fourth quarter, pushing up spending by fastest rate in nearly nine years. But business investment, trade and government spending weakened.

Paul Ashworth, chief U.S. economist at Capital Economics, said the slowdown is “nothing to worry about.” It was heavily influenced by a swing in the volatile defense spending category, which had jumped sharply in the summer only to reverse in the fourth quarter. He pointed to the acceleration in consumer spending as more indicative of where the economy is headed.

“With the collapse in energy prices increasing households’ purchasing power, we expect strong consumption growth to continue driving GDP growth in the first half of this year,” Ashworth said.

For 2014 overall, the economy grew at a moderate rate of 2.4 percent. The year began on a sour note as severe winter storms sent the economy into reverse. GDP dropped at a 2.1 percent rate in the first quarter. But the economy bounced back, with growth averaging 4.1 percent over the next three quarters.

Economists have even higher hopes for 2015. With strong employment gains and falling gas prices boosting consumer spending, many analysts expect growth above 3 percent this year.

That would mark a significant acceleration after a prolonged period of sub-par activity. Since the recession ended in 2009, economic growth has averaged just 2.2 percent, far below the kinds of gains normally seen after a deep recession.

In the October-December period, consumer spending, which accounts for 70 percent of economic activity, grew at 4.3 percent rate, up from 3.2 percent growth in the third quarter. It was the strongest gain for consumer spending since the first three months of 2006.

But business investment on equipment shrank at a 1.9 percent annual rate after big gains in the previous two quarters. Economists partly blamed the weakness on cutbacks in oil and gas drilling by energy companies grappling with the plunge in energy prices.

Government spending fell at a 2.2 percent annual rate in the fourth quarter after a 4.4 percent gain in the third quarter. The third quarter had been bolstered by a 16 percent rise in defense spending, which backpedaled in the fourth quarter.

Trade, which had contributed 0.8 percentage point to growth in the third quarter, reduced growth by a full percentage point in the fourth quarter. Business stockpiling added 0.8 percentage point.

The government’s estimate on GDP — the economy’s total output of goods and services — was the first of three estimates for the October-December quarter.

Even with the fourth quarter slowdown, the U.S. economy continues to outpace other big economies with Europe battling renewed weakness, Japan in a recession and even growth in China slowing.

Last week, the International Monetary Fund cut its outlook for global growth over the next two years, warning that weakness in most major economies will trump lower oil prices. But the IMF increased its outlook for the U.S. economy, pegging growth this year at 3.6 percent. If that forecast comes true, it would mark the fastest annual U.S. growth in over a decade.

“It took us awhile to get here, but I think the economy is finally off and running,” said Mark Zandi, chief economist at Moody’s Analytics. “We are seeing a number of positive developments. Businesses are hiring aggressively and the big drop in gas prices means that people have more money to spend on other items.”

Global oil prices have fallen by nearly 60 percent in just seven months, with the nationwide average for gasoline now around $2 per gallon.

That decline translates into a savings for consumers of about $175 billion, Zandi said. “A big part of growth this year will be people spending their gas savings,” he said.

The Federal Reserve on Wednesday took note of the better economic conditions while promising to remain “patient” in deciding when it is time to begin raising interest rates. A key Fed rate has been at a record low near zero for six years.

The central bank has leeway to be patient because the weaker global economy has helped push up the value of the dollar against other countries and gasoline prices are plunging. Both developments are helping to hold down inflation, which was already low.