Image copyright AP Image caption Growth in consumer spending slowed to 1.9%

The US economy "all but stagnated" in the first three months of the year, growing at an annual rate of just 0.2%, official figures show.

The growth figure was far lower than expectations. Analysts had forecast growth would be about 1%.

Harsh winter weather for a second year dampened consumer spending, while energy companies struggling with low oil prices cut investment.

The strength of the dollar also hurt exports, which fell by 7.2%.

A strike by dock workers at normally busy West Coast ports also hindered growth.

But the US Commerce Department said there were signs that activity was picking up in the second quarter.

The US growth figure much lower than the previous three months, when the economy expanded at an annualised pace of 2.2%.

Image copyright Reuters

Analysis: Linda Yueh, BBC chief business correspondent

The dollar has risen on the back of expected rate rises by the Fed, and has hit the highest level in more than 10 years against its trading partners.

That has hit the ability of US exporters to sell their wares overseas. Tellingly, services exports continued to grow by 7.3%, since selling services isn't very dependent on the price, but rather relies on the quality of what's proffered. It's also not dependent on ports.

A strong dollar, though, helps consumption and imports, which registered positive growth of 1.8%.

In other words, a strong dollar makes imports cheaper and keeps down price rises. Those imports feed into consumption, which expanded by 1.9%.

That's not the strongest growth rate, since there are also reports that the cold weather made consumers reluctant to venture out and spend.

But it's a positive growth driver alongside investment, which also expanded by 2%. The final component of GDP, government spending, contracted by 0.8% due to continued cutbacks by state and local governments.

So, what growth the US economy eked out was due to private consumption and investment.

Read Linda's blog in full

The Commerce Department did not say how much impact the weather, the strong dollar and the ports disruptions had had on growth.

But economists estimated that the unusually cold weather in February could have affected economic growth by as much as half a percentage point, with the port disruptions reducing growth by a further 0.3 percentage points.

Growth in consumer spending, which accounts for more than two-thirds of US economic activity, slowed to 1.9%. That compared with 4.4% growth in the fourth quarter of 2014.

Oil price

The extreme winter weather also meant construction output slowed, while lower oil prices led to a slowdown in US oil production and a reduction in investment.

Business investment in mining, exploration, shafts and oil wells plunged by 48.7% in the quarter, the Commerce Department said.

US oil field services provider Schlumberger has cut its capital spending plans for this year by about $500m to $2.5bn, while Halliburton has reduced investment by about 15% to $2.8bn.

However, economists believe that most of the cuts to investment by energy companies have already taken place, and so energy-related spending will not weigh on growth as much in the second quarter of the year.

Paul Ashworth, chief US economist at Capital Economics, said the US economy "all but stagnated" in the first quarter.

But he added that while the 0.2% annualised gain might raise fears that the recovery was somehow coming off the rails, he anticipated a "marked acceleration in growth" over the remaining three quarters of this year.

"Over the past 12 months, the economy has expanded by 3% and we would expect it to continue growing at around that pace this year too," he added.

The first quarter growth figures come ahead of the outcome of the latest US Federal Reserve meeting.

While no change in interest rates is expected, the Fed's statement will be studied for clues as to when the central bank might start to raise rates.