The U.S. economy turned in the weakest performance in three years in the January-March quarter as consumers sharply slowed their spending. The result fell far short of President Donald Trump's ambitious growth targets and underscores the challenges of accelerating economic expansion.

The gross domestic product, the total output of goods and services, grew by just 0.7 percent in the first quarter following a gain of 2.1 percent in the fourth quarter, the Commerce Department reported Friday.

The slowdown primarily reflected slower consumer spending, which grew at a seasonally adjusted annual rate of 0.3 percent after a growth rate of 3.5 percent in the fourth quarter. It was the poorest quarterly showing in more than seven years.

Despite the anemic first-quarter performance, the U.S. economy's prospects for the rest of the year appear solid. Growth is expected to be fueled by a revival in consumer spending, supported by continued strong job growth, accelerating wage gains and record stock levels.

Weakness in the first quarter followed by a stronger expansion in the spring has become a pattern in recent years. The government's difficulty with seasonal adjustments for the first quarter has been a chronic problem and may have shaved as much as 1 percentage point off growth this year.

The sharp slowdown in consumer spending in the first quarter was attributed to a collection of temporary factors: warmer weather, which shrank spending on heating bills, a drop-off in auto sales after a strong fourth quarter and a delay in sending out tax refund checks, which also dampened spending.

Sal Guatieri, senior economist at BMO Capital Markets, said he expected consumer and government spending to bounce back, leading to a much stronger second quarter.

"Still, the report will mark a rough start to the administration's high hopes of achieving 3 percent or better growth, not the kind of news it was looking for to cap its first 100 days in office," Guatieri said in a note to clients.

Commerce Secretary Wilbur Ross, one of the administration's top economic policymakers, said that the weak first quarter performance showed the need for the new policies Trump is offering.

"We need the president's tax plan, regulatory relief, trade negotiations and the unleashing of (the) American energy sector to overcome the dismal economy inherited by the Trump administration," Ross said in a statement.

He said that strong business and consumer sentiment "must be released from the regulatory and tax shackles constraining economic growth."

Averaging the two quarters, they forecast growth of around 2 percent for the first half of this year. That would be in line with the mediocre performance of the eight-year economic expansion, when growth has averaged just 2.1 percent, the poorest showing for any recovery in the post-World War II period.

Trump had repeatedly attacked the weak GDP rates during the campaign as an example of the Obama administration's failed economic policies. He said his program of tax cuts for individuals and businesses, deregulation and tougher enforcement of trade agreements would double growth to 4 percent or better.

In unveiling an outline of the administration's tax proposals on Wednesday, Treasury Secretary Steven Mnuchin said he believed growth above 3 percent would be achievable.

Many economists are more skeptical. They are forecasting growth of this year around 2.2 percent. That would be an improvement from last year's 1.6 percent, the weakest showing in five years, but far below Trump's goal. Many analysts believe that the impacts of Trump's economic program will not be felt until 2018 because they are not expecting Congress to approve some version of Trump's tax program until late this year.

The GDP report released Friday was the first of three estimates the government will make of first quarter growth.

The 0.7 percent increase was the worst showing since GDP contracted by 1.2 percent in the first quarter of 2014.

In addition to weaker consumer activity, the first quarter slowdown also reflected a cutback in restocking of store shelves. The slowdown in inventory rebuilding cut nearly a percentage point from growth in the first quarter. Also acting as a drag was a reduction in government spending, which fell at a 1.7 percent annual rate with both the federal government and state and local governments seeing cuts.

On the positive side, business investment rose at a 9.4 percent rate, helped by a record surge in spending in the category that tracks spending in the energy sector. This category had seen sharp cutbacks in recent quarters, reflecting reductions in exploration and drilling as energy prices declined. Housing construction was also strong, growing at a 13.7 percent rate, the fastest pace in nearly two years.

Trump noted the weak 2016 GDP performance in a tweet Wednesday and contended that "trade deficits hurt the economy very badly." For the first quarter, trade was actually a small positive after a major drag in the fourth quarter.