The U.S. economy surged ahead at its fastest pace in nearly two years in the first quarter, although a bit more slowly than initially thought, the government said on Friday in a report that showed spending by consumers and businesses was weaker than first estimated.

Gross domestic product, a measure of the goods and services produced within U.S. borders, raced forward at a revised 5.6 percent annual rate in the first three months of the year, the Commerce Department said. A month ago the department had said GDP advanced at a 5.8 percent pace.

Economists polled by Reuters had expected U.S. GDP growth to be revised up to 6.0 percent.

The dollar softened somewhat against the yen and euro after the report was released.

While first-quarter GDP growth was little changed from the earlier estimate, the report showed consumer spending and business investment were weaker than thought earlier, suggesting the economy's underlying strength at the start of the year was less pronounced as well.

"When you look a the details, the economy has not picked up anything like what the overall GDP number implies," said Jim O'Sullivan, senior economist at UBS Warburg.

The department said consumer spending advanced at a 3.2 percent pace -- still solid, but not as strong as the 3.5 percent increase first reported. The downward revision mostly reflected weaker spending on durable goods, such as cars, which fell at a 9.6 percent rate, the steepest falloff since a 13.1 percent plunge 11 years ago.

At the same time, business investment plummeted 8.2 percent, considerably weaker than the initially estimated 5.7 percent drop.

Still, business investment -- which Federal Reserve officials have said would provide the key to a solid, sustainable economic expansion -- did not drop nearly as sharply as it had in the fourth quarter. That offers some hope the steep plunge in investment that tipped the U.S. economy into recession last spring was abating.

The largest contributor to first-quarter growth was a big slowdown in the rate at which businesses reduced inventories. When businesses rely less heavily on inventories to meet demand they have to step up production, which raises GDP.

With inventory reduction less dramatic than previously thought, there was more of a boost to GDP growth from this but not enough to offset other negative factors.

"There's still a fair amount of lift to come from the inventory side and it buys time to see final (business and consumer) demand turning," said James Glassman, senior economist at J.P. Morgan in New York.

Government spending rose sharply in the first quarter, although spending by state and local governments was somewhat weaker than the department had estimated earlier.

The report contained some good news on businesses struggling to boost profits. The government's measure of after-tax corporate profits rose 0.9 percent in the first quarter of the year, the biggest gain since the second quarter of 2000.