New U.S. housing starts and permits surged in May from record lows, while wholesale prices were muted despite higher gasoline costs, indicating the economy was moving closer to the end of a deep recession.

The Commerce Department said on Tuesday housing starts jumped 17.2 percent, the biggest rise in three months, to an annual rate of 532,000 units. This was as ground-breaking activity for multifamily homes surged 61.7 percent after diving 49.4 percent in April.

Even more encouraging for the housing sector, which is at the center of the longest U.S. output decline since the Great Depression, single family starts rose 7.5 percent, the largest gain since January 2006.

Ground breaking activity for single family homes has now risen for three straight months, an indication that housing investment could be less of a drag on the economy in the quarters ahead, if the trend continues.

There is hope that we are moving toward the end of the recession, but we will caution that once we get to that point any recovery is going to be very muted. It (economy) will not come from the recession with all guns blazing, said Paul Dales, an economist at Capital Economics in Toronto.

A separate report from the Labor Department showed prices paid at the farm and factory gate increased by 0.2 percent versus a 0.3 percent April rise.

Prices compared with a year ago notched their steepest falls since 1949, which should help to ease market fears that inflation could soon be stalking the economy after the recent spike in longer-dated government bond yields.

U.S. stocks ended lower as weekly retail sales data showed weak sales and disappointing quarterly earnings from Best Buy Inc highlighted consumer reluctance to spend on non-essential items.

Government bond prices rallied after the Federal Reserve bought a bigger-than-expected amount of Treasury debt as part of a wider program to help keep interest rates down.

HOUSING BOTTOMING

Housing market data, including new and existing home sales have shown signs of bottoming in the slide, but the surge in mortgages rates following a spike in Treasury debt yields could hamper the sector's recovery.

Benchmark government bond yields jumped to an eight-month high last week on concerns the government's effort to pull the economy out of a 18-month old recession would push the country's budget deficit to unsustainable levels and undermine the value of its assets and ignite inflation.

While new housing starts rose on a monthly basis in May, they dived 45.2 percent compared to the same period a year ago, the Commerce Department said.

If we see growth next month (in new housing starts), we might actually have a positive contribution from housing starts coming up in 2009. That would be very beneficial to (overall economic) growth, said Rebecca Braeu, economist at John Hancock Financial, in Boston.

But economist Nouriel Roubini, who predicted the credit crisis before it broke, told Reuters he remained pessimistic about the chances of a recovery for prices soon in the U.S. housing market.

The gap between supply and demand is huge. You could stop housing starts...today and it would take a year to clear the inventory of existing homes, Roubini told Reuters Television. I expect home prices are going to fall for another year-and-a-half by another 15 to 20 percent.

New building permits, which give a sense of future home construction, rose 4.0 percent, the biggest gain since June 2008, to 518,000 units in May, the Commerce Department said.

The slower pace of increase in May producer prices was a relief for investors who of late have been preoccupied with inflation in the wake of the surge in government bond yields.

Compared with the same period last year, producer prices fell 5.0 percent for the largest decline since August 1949, the Labor Department said.

Our take is that once you add in the fall in labor costs as companies cut their head count and also wages, there probably won't be an inflation threat from the rebound in oil prices, said Capital Economics' Dales.

Core producer prices, which exclude food and energy costs, dropped 0.1 percent in May compared with a forecast for a 0.1 percent rise, and after a 0.1 percent increase in April.

This was the largest decline in monthly core producer prices since October 2006, when they fell 0.5 percent. In contrast with May 2008, core producer prices rose 3.0 percent. Gasoline prices rose 13.9 percent.

Another report from the Federal Reserve also suggested any worries about inflation as a result of aggressive programs by the U.S. central bank to boost the economy may be overblown.

Industrial production fell 1.1 percent in May, dragged down by declining vehicle output following auto plant shutdowns by mostly Chrysler, currently in bankruptcy to help it reorganize, and continued inventory cut backs by manufacturers.

Production fell 0.7 percent in April. Capacity utilization, a measure of slack in the economy dipped to a record low 68.3 percent.

The excess slack evident in the economy is a key reason why we expect deflation pressures to continue to build, said Steven Ricchiuto, chief economist at Mizuho Securities in New York.

(Additional reporting by Alister Bull and Mark Felsenthal in Washington)