First Solar, one of the world’s leading solar-panel makers, announced Tuesday that it will close its German manufacturing operations late this year, indefinitely idle four of its 24 production lines in Kulim, Malaysia, on May 1 and lay off 2,000 employees — about 30 percent of its global workforce.

The company, which with its thin film panels is the industry leader in manufacturing cost per watt of solar energy, is struggling along with other companies to compete in a market with rapidly falling prices and cutbacks in international subsidy programs that have helped sustain solar-panel sales.

The European market, which had some of the biggest subsidy programs, has been hit particularly hard by the continent’s debt crisis during the past two years. Four of Germany’s largest solar-panel and solar-cell makers have declared bankruptcy in recent weeks.

“The vast majority of the European market is not viable without significant subsidies,” said Mark Widmar, First Solar’s chief financial officer.

First Solar, of Tempe, Ariz., said its restructuring initiatives, including lowering debt, would reduce costs by $30 million to $60 million this year and $100 million to $120 million annually after that. It said its average manufacturing cost is expected to drop 70 to 72 cents per watt this year, below expectations, and then fall further in 2012 to between 60 and 64 cents per watt.

But the company will take charges of $245 million to $370 million.

Investors welcomed the news. First Solar stock closed at $22.96 a share, up more than 10 percent though still down 32 percent this year.