U.S. industrial output gained for the first time in nine months in July and inflation remained muted, but consumer confidence was unexpectedly weak this month, according to reports on Friday.

The Reuters/University of Michigan Surveys of Consumers said its preliminary reading of the index of confidence for August fell to 63.2 from 66.0 in July, well below market expectations for a reading of 68.5.

The erosion in consumer confidence supports the belief that the economic recovery is going to be weak. Consumers fuel about 70 percent of U.S. economic activity but are fearful about their futures.

Stocks on Wall Street brushed aside the upbeat industrial production data, falling as investors focused on the ebbing consumer confidence, which came a day after a report showing an unexpected drop in retail sales in July.

What we are seeing here is further evidence that the supply side of the economy is switching on quicker than the demand side. The consumer remains the point of maximum vulnerability for the recovery, said Alan Ruskin, chief international strategist at RBS Securities in Greenwich.

Industrial output rose 0.5 percent, beating market expectations for 0.3 percent advance, after a 0.4 percent contraction in June, according to a Federal Reserve report.

Aside from a hurricane-related rebound in October 2008, it was the first monthly gain since December 2007, when the current recession started, the Fed said.

Separately, the Labor Department said U.S. consumer prices were flat in July and dropped over the past 12 months at the fastest rate since 1950. That may suggest deflation, not inflation, is more a threat even amid signs the worst recession since the Great Depression is loosening its grip.

In the another indication the economic recovery would be sluggish, retailer J.C. Penney Co Inc warned earnings could miss expectations.

AUTO PLANTS BOOST PRODUCTION

Industrial production was boosted as Chrysler and General Motors reopened plants that had been temporarily closed while the companies were under bankruptcy protection to reorganize, Fed data showed.

Production also lifted by the government's cash-for-clunkers program, which gives consumers a credit for trading in aging high fuel consuming vehicles for new fuel efficient models.

The increase in industrial production is yet another indication that the U.S. recession is drawing to a close, said Harm Bandholz, economist at UniCredit Markets and Investment Banking in New York.

Analysts expect the economy to grow in the second half, but caution the recovery might prove unsustainable.

Growth is spurred temporarily by government initiatives, such as the cash for clunkers program, which further lifts the prospect for auto production. As those programs will taper off, the upswing will turn from a V-shaped into a more volatile W-shaped recovery, said Bandholz.

Manufacturing output rose 1 percent in July as motor vehicle assemblies rose to an annual rate of 5.9 million units in July from 4.1 million in June. Excluding autos and parts, industrial output fell 0.1 percent in July, the Fed said.

The capacity utilization rate, a measure of slack in the economy, edged up to 68.5 percent, but is still 12.4 percentage points below the 1972-to-2008 average.

Analysts reckon the slack in the economy will keep inflation pressures muted for a while.

The U.S. economy may be close to exiting recession, but the full impact of the loss of output is only now beginning to feed through into consumer prices, said Paul Ashworth, senior U.S. economist at Capital Economics Toronto.

It will be several years before the massive negative output gap that has opened up is closed and the unemployment rate falls back toward its natural rate.

The Fed this week left its key overnight lending rate steady near zero, saying substantial resource slack was likely to dampen price pressure and it expected inflation to remain subdued for some time.

Stripping out volatile energy and food prices, the closely watched core measure of consumer inflation rose 0.1 percent in July after increasing 0.2 percent in June.

Compared to July last year, the core inflation rate rose 1.5 percent, the slowest advance since February 2004, after increasing 1.7 percent in June.

(Additional reporting by Emily Kaiser in Washington and Ciara Linnane in New York; Editing by Neil Stempleman)