Photograph by Shelley Dennis — Getty Images
By Dan Primack
June 13, 2013

During last year’s presidential campaign, federal loan guarantees for alternative-energy companies became a GOP punch line. Mitt Romney referred to some of the recipients as “losers.” Paul Ryan said they addressed “make-believe markets.” Marco Rubio claimed that the Department of Energy was “wasting more taxpayer money,” based largely on the well-publicized failure of solar-panel maker Solyndra. But a funny thing happened on the way to the burial: The loan program began to work. Thousands of jobs have been created. Domestic energy production is more diversified. Most important, the U.S. taxpayer is being set up for a possible profit.

Before continuing, let me be clear: I’m not really a proponent of the loans, or of any other government effort to play venture capitalist, private equity investor, loan officer, etc. Not because I subscribe to stringent free-market dogma, but because such programs too often lose money (thanks, in part, to political considerations infringing on financial analysis). That’s why I’ve taken notice of this Department of Energy program: It is proving either an exception to the rule or a new model for such programs going forward.

The DoE loan program began under President George W. Bush and was supercharged by President Obama as part of the 2009 economic stimulus. To date it has committed $34.4 billion to 33 companies and projects, only about $17 billion of which has been disbursed so far. The largest commitment was $8.3 billion to help Georgia Power build a pair of next-generation nuclear reactors. The smallest was $43 million for Beacon Power to build a flywheel energy facility in upstate New York (Beacon later went bankrupt and was acquired in a deal that could salvage 70% of its DoE loan). But the overall loan portfolio seems to be in good shape. Well-publicized losses from companies like Solyndra represent just 2% of total commitments. Around half of the remaining projects are operational, and the recipients have begun repaying their loans.

DoE does not publicly disclose repayment information, but Fortune has learned that active loan recipients have wired it some $1.4 billion to date, compared with $945 million in scheduled repayments. That includes an accelerated repayment by electric carmaker Tesla Motors, which in May repaid its entire $465 million loan, plus around $20 million in interest. DoE is still a long way from officially locking in aggregate gains — Tesla, for example, wasn’t scheduled for full repayment until 2022 — but it certainly has a viable path to profitability. So what lessons can be gleaned from the loan program when a state or federal government tries something similar in the future?

Get private sector buy-in. DoE required loan recipients to have debt-to-equity ratios similar to that of comparable projects, so applicants often had to secure outside funding from sources like private equity firms. This served as a sort of capitalist peer review and reduced the likelihood of default.

Make sure there is a built-in upside. If the DoE program ends up in the black, it will be because it charged interest on its loans. That may sound obvious, but it doesn’t always happen; Mississippi, for example, gave a $75 million interest-free loan to renewable-fuel company KiOR. Loans also should come with strong covenants that allow the government to pull out or receive equity participation for assuming additional risk (something the DoE program adopted in 2010).

Seek full transparency. The DoE program’s primary problem wasn’t so much that Solyndra failed, but that it was accused of funding it as a political favor. Put full sunshine on e-mail strings and other decision-making communications to remove the appearance of impropriety. And then keep a public database of repayments (something DoE does not now do). Remember, government is the lender of last resort — and with that comes leverage.

Have patience. When politicians attack these long-term portfolios for early bumps in the road, they are setting themselves up to look foolish in the future. Republicans are unlikely to apologize to President Obama for their premature exclamations, but Democrats will surely remind voters that they should.

This story is from the July 1, 2013 issue of Fortune.


You May Like