The U.S. economy came perilously close to flat-lining in the first quarter and grew at a meager 1.3 percent annual rate in the April-June period, leading economists to warn of recession if a stand-off over U.S. debt does not end quickly.

The Commerce Department data on Friday also showed the current lull in the economy began earlier than had been thought, with the growth losing steam late last year.

That raised questions on the long held view by both Federal Reserve officials and independent economists that the slowdown in growth this year was mostly due to transitory factors.

The U.S. economy in the first quarter expanded at just a 0.4 percent pace, a sharp downward revision from the previously reported 1.9 percent increase. While the recovery stepped-up in the second quarter, economists had expected a stronger 1.9 percent reading.

Fourth-quarter growth was revised to a 2.3 percent rate from 3.1 percent.

The second quarter disappointed, but the first-quarter downward revision is more disturbing. It advances the pangs of concern. The debt ceiling nonsense is not going to help us. We're already in an economy that is subpar, said Scott Brown, chief economist at Raymond James in St. Petersburg, Florida.

U.S. stocks opened lower on the data, while prices for government debt rose. The dollar fell against a basket of currencies.

FUNDAMENTAL SLOWDOWN?

Economists had expected the economy would show signs of perking up by now with Japan supply constraints easing and gasoline prices off their high, but data has disappointed.

This and the sharp downward revisions to the prior quarters suggest a more troubling and fundamental slowdown might be underway.

There is also heightened uncertainty over the outlook because of the impasse in talks to raise the nation's $14.3 trillion borrowing limit and avoid a damaging government debt default, although the budget cuts a deal may impose could also weigh on growth.

The U.S. Treasury has said it will run out of borrowing authority on Tuesday and the government could quickly run out of enough cash to pay all its bills.

With a fiscal consolidation on the way, it is hard to see the economy getting much stronger. In fact, if the debt ceiling is not raised by the end of Tuesday, we could well have another recession on our hands, said Paul Dales, senior U.S. economist at Capital Economics in Toronto.

The March earthquake in Japan severely disrupted U.S. auto production. The resulting shortage of motor vehicles weighed on retail sales as consumers were unable to find the models they wanted. That combined with high gasoline costs to curb spending.

Consumer spending, which accounts for about 70 percent of U.S. economic activity, decelerated sharply to a 0.1 percent rate -- the weakest since the recession ended two years ago.

Clearly this is evidence of a mid-cycle slowdown. The only question now is do we see a pick up in the second half and so far the economic data to date doesn't suggest that, said Tim Ghriskey, chief investment officer at Solaris Asset Management in Bedford Hills, New York.

SUPPLY DISRUPTIONS WEIGH

Motor vehicle production subtracted 0.12 percentage point from gross domestic product growth in the second quarter, after adding 1.08 percentage points to first-quarter GDP growth.

The composition of growth in the April-June quarter was weak and could prompt economists to dial down their expectations for a solid rebound in the third quarter.

A smaller trade deficit, as imports slowed, was one of the main contributors to the rise in second-quarter growth, with businesses spending and inventory investment also adding to output.

Government spending declined again as state and local authorities continued to pare their budgets, even though defense expenditures rebounded at 7.3 percent rate after contracting at a 12.6 percent rate in the first three months of the year.

Home building rose at a 3.8 percent pace, while investment in nonresidential structures increased at an 8.1 percent rate.

The easing of the auto parts disruptions and a drop in gasoline prices could be a tail wind to third-quarter growth, but economists are concerned that data for June has been weak.

The report showed a moderation in inflation, with the overall consumer prices rising at a 3.1 percent rate after rising 3.9 percent in the first quarter. But excluding food and energy, prices increased 2.1 percent, the fastest since the fourth quarter of 2009 and above the Federal Reserve's preferred 2.0 percent level.

Data released along with the latest GDP figures on Friday also showed the 2007-2009 recession was much more severe than prior measures had found.

(Editing by Neil Stempleman)