Persistent federal spending cuts and a slowdown in business investments thwarted hopes for stronger economic growth in the first quarter, setting up more modest gains in jobs and income into the summer.

The U.S. economy expanded at an annual rate of 2.5% in the first three months of the year, the Commerce Department reported Friday.

That was a big improvement from the measly 0.4% increase in the fourth quarter, when deep defense cuts and smaller stockpiling by companies slashed growth. But the latest measure of the nation's gross domestic product was still middling and fell short of most analysts' forecast of about 3%.

As expected, farms and other businesses replenished inventories as the year began, accounting for a good part of the acceleration in the GDP, or the total value of all goods and services produced inside U.S. borders.

Consumer spending, which makes up more than two-thirds of the economy, also was unexpectedly robust in the first quarter. Even as after-tax incomes shrank over the quarter, people kept buying more cars and other long-lasting products.

And spending for services, including utilities, insurance and healthcare, rose in the first quarter at the fastest pace since 2005.

Although the private economy is hanging tough, the public sector proved to be a bigger drag than economists had feared.

After falling at an annual rate of 7% in the fourth quarter, government spending and investment, mostly federal, slid 4.1% in the first three months this year. National defense expenditures dropped 11.5% in the quarter, after plunging 22.1% in the previous quarter.

"The U.S. budget deficit is shrinking at the fastest rate since demobilization following the second World War," said James Marple, a senior economist at TD Bank. Government cutbacks will continue to hold back economic growth in the second and third quarters, he said.

Some of the Pentagon spending reductions appear to have been made in anticipation of the automatic budget cuts that took effect in March, but more recently non-defense agencies have begun to furlough workers.

Those unpaid leaves will affect incomes and spending in the coming months, though the House on Friday approved a measure to stop the furlough of at least one large group of highly paid workers: air traffic controllers.

Bank of America economists had estimated that the lost wages from the furloughs and costs related to airport delays would amount to $400 million a year.

Still, analysts on average see economic growth retreating to a number closer to 1% in the current quarter before picking up later this year as government spending cuts fade and the private sector gains steam.

Starting next year, assuming no major shocks, top Federal Reserve officials and many private economists believe that the nation could finally enter a period of significantly stronger growth.

Friday's report did not change that basic outlook, but it nonetheless highlighted the uncertain and fragile state of consumers and businesses.

Consumer spending in the first quarter jumped at a 3.2% annual rate, the fastest since late 2010 and nearly double the pace of last year's fourth quarter. This reflected pent-up demand for goods and services and the recovering housing market.

"The strengths in consumer spending are now attributable to gains in household wealth, including rising home values and stock prices as well as reduced debts," said Richard Curtin, director of the Thomson Reuters/University of Michigan consumer confidence survey.

Curtin noted that the improvement has been particularly strong among upper-income families.

But the big question is, can the strong spending last? Many economists do not think so.

Curtin's latest survey, released Friday, showed consumer sentiment slipping 2.2 points from March to 76.4 in April, with jobs and income remaining the top concern.

What's more, some of the personal consumption increase in the first quarter appeared to have been driven by temporary factors, such as colder than normal weather.

Retail spending fell in March, and economists believe that Americans are slowly realizing that their paychecks are lighter after the temporary payroll tax cut expired at the start of the year.

The first two months of the year looked promising for the economy, but the pace of job growth abruptly weakened in March. Some other indicators also have softened in recent weeks, including orders for long-lasting manufactured goods.

"People were encouraged and they took on a little more consumer debt, but it's really hard to sustain those type of increases going forward without significant job growth," said Kathy Bostjancic, an economist at the Conference Board, an employer-sponsored research group.

Without stronger job creation and improvement in the nation's unemployment rate — 7.6% in March — consumers will be pressed to keep spending heartily.

After-tax incomes tumbled 5.3% in the first quarter. That was the lowest since the economic recovery officially began in mid-2009 and erased almost all of the income gains in the fourth quarter, when there was a surge of dividends and bonuses ahead of expected tax increases.

To support their spending in the first quarter, consumers saved less. The personal saving rate fell to 2.6% of disposable income, from 4.7% in the fourth quarter — the lowest since late 2007, when the Great Recession began.

Consumers will get some help from the recent slide in gasoline prices. But should there be a drop-off in consumer spending, businesses already nervous about the effects of the automatic federal spending cuts will be more reluctant to add workers and invest.

Business investment in the first quarter advanced, but not as much as analysts had hoped.

Company spending for equipment and software rose at a 3% annual rate in the quarter, but that was down from 11.8% in the fourth quarter. Residential investment increased at a double-digit percentage rate for the third straight quarter, but spending for commercial structures fell slightly for the first time in two years.

Some of the business spending slowdown reflected a "giveback to tax hedging in the fourth quarter," said Diane Swonk, chief economist at Mesirow Financial in Chicago. Still, in a note to clients, she called the investment moderation "disturbing."

"We need more investment to have a foundation for future economic growth," she said.