U.S. solar companies SunPower Corp and MEMC Electronic Materials Inc on Thursday offered hope that the beleaguered solar industry is on the mend, each posting quarterly earnings and giving revenue outlooks that topped Wall Street estimates.

Chinese solar player LDK Solar Co Ltd also weighed in with positive news, raising its second-quarter forecasts for both shipments and revenue.

This is a lot better than what many were anticipating, Wedbush Morgan analyst Al Kaschalk said of SunPower's results, which blew past analysts' expectations and prompted the biggest U.S. panel maker to raise its 2009 revenue range.

The company's stock soared 19 percent in extended trade to $29.50 after closing at $24.84 on the Nasdaq.

A dearth of financing for renewable energy projects combined with a pullback in solar tax breaks in Spain have led to a flood of solar panels on the market, driving down prices and profits across the industry.

After a dismal first quarter, however, the market proved to be stronger than expected last quarter, SunPower said.

Demand was better than we expected in most regions, SunPower Chief Executive Tom Werner said on a conference call with analysts.

Second-quarter net income fell 22 percent to $24.2 million, or 26 cents per share, compared with $31.2 million, or 37 cents per share, a year ago.

Excluding one-time items, the company earned 24 cents a share, topping Wall Street analysts' average estimate of 15 cents a share, according to Reuters Estimates.

The San Jose, California, company said it benefited from improved sales of residential and smaller commercial systems in California, where it gained market share, as well as a 23 percent reduction in inventories and other cost controls.

In addition, Werner said in an interview that SunPower has a number of power plant-scale projects in both Italy and the United States that are in the process of being financed and should drive results for the rest of this year.

The company expects third-quarter revenue and earnings per share to be up 40 percent from the second quarter.

MEMC, LDK GIVE STRONG SALES VIEWS

MEMC's results were more mixed. The silicon maker's quarterly profit also topped estimates on stronger-than-expected revenue, though gross margins were below expectations, according to Jefferies & Co analyst Paul Clegg.

The company, which makes the key raw material in solar panels and semiconductors, also forecast third-quarter revenue that exceeded Wall Street analysts' average view, though it said margins would be up only modestly.

The St. Peters, Missouri-based company, which has been hurt by a sharp drop in silicon prices, said sales to the semiconductor industry were helped by stronger demand from Asia and inventory replenishment. Solar demand remained restrained, however, MEMC said, though the company added several new solar customers during the quarter.

We are in a recovery, we just don't know how steep the climb is going to be, Clegg said. But we are on the way.

Silicon prices went as high as $500 a kilogram last year due to shortages as solar manufacturers scrambled to buy supplies. But new production capacity and shrinking demand has pushed those prices near the $50 mark in recent weeks, and MEMC has been forced to renegotiate long-term contracts with customers including China's Suntech Power Holdings Co Ltd and Taiwan's Gintech Energy Corp.

MEMC also said that during the quarter it reached a deal with German solar cell maker Q-Cells to form a joint venture to construct and sell solar power plants. MEMC will invest up to $100 million in the venture this year.

MEMC shares were down 1.4 percent after-hours at $20.57 after closing at $20.86 on the New York Stock Exchange.

Finally, solar wafer maker LDK late on Thursday raised its revenue and shipment forecast for the second quarter but said it expected to take a write-down of $150 million to $160 million for a decline in the value of its solar wafer inventories. As a result, the company expects to post a quarterly net loss of $180 million to $200 million.

LDK will report quarterly results on August 12.

LDK shares rose to $10.35 after closing at $10.30 on the New York Stock Exchange.

(Reporting by Nichola Groom; Additional reporting by Matt Daily in New York and Braden Reddall in San Francisco; Editing by Gary Hill)