The US economy rebounded in the second quarter, growing at a peppy 4% pace after the first quarter's sharp contraction, the country’s Commerce Department has said.

In a sign that the economy is stronger than earlier thought, the department also revised its estimate of the January-March contraction to 2.1%, compared to the more severe 2.9% drop previously reported.

And it upped its estimate of growth in 2013 to 2.2% from 1.9% previously, due to a much stronger second half than previously thought.

The initial estimate of second-quarter 2014 growth was far better than most analysts had expected and showed solid rebounds in private investment and consumer spending, especially on durable goods.

That suggested that the severe winter weather and a modest slump in confidence between December and March were indeed behind the slowdown, as economists have said.

"This is not just a case of better weather. There is evidence to indicate that there has also been an underlying improvement in the economy, and that robust growth will be sustained into the third quarter," said Chris Williamson, chief economist at Markit.

Underpinning that view is the surge in hiring over the first half of the year. Job creation over the first half was the strongest since 2007, averaging 231,000 new positions each month and pushing the unemployment rate down to 6.1%.

Analysts think those gains could begin to show up in a tighter jobs market and larger paychecks for workers, boosting consumer spending.

But most analysts did not expect the 4% pace of growth to carry through the rest of the year. 

Williamson said he expects slightly slower job creation and business investment growth between now and December, which should hold economic growth for all of 2014 to around 2%.

Private investment in the second quarter soared 17%, after shrinking 6.9% in the previous period. Investment was strong in both equipment and homes.

Personal consumption expenditures grew 2.5% in the second quarter compared to 1.2% in the previous period, and spending on consumer durable goods leaped 14%.

The country's chronic trade deficit was also less of a drag on growth after exports rebounded sharply from the first quarter decline.  Taken as a net - imports detract from gross domestic product - the trade deficit took 0.61 percentage point off growth, compared to 1.66 points in the first quarter.

Government spending also added to economic strength, after having been flat or negative for six quarters.