Tesla's early repayment is mainly due to last week's announcement regarding its plan to issue more stock and pay off the energy loan with the proceeds

Tesla Motors announced today that it has repaid its $465 million energy loan in full nearly a decade early.

"I would like to thank the Department of Energy and the members of Congress and their staffs that worked hard to create the [loan] program, and particularly the American taxpayer from whom these funds originate," said Elon Musk, Tesla co-founder and CEO. "I hope we did you proud."

Tesla was approved to receive a $465 million loan from the U.S. Department of Energy (DOE) in June 2009. The loan, which was part of the Advanced Technology Vehicles Manufacturing program, was to be repaid by 2022. But in March of this year, Tesla received permission to pay the loan back five years early by mid-2017.

But now, Tesla has repaid the whole sum -- nine years earlier than expected from the original 2022 due date.

Tesla's early repayment is mainly due to last week's announcement regarding its plan to issue more stock and pay off the energy loan with the proceeds. Tesla said it wanted to sell about $830 million in shares, and use $450 million in convertible senior notes (which are due in 2018) along with sales of 2.7 million shares (valued at about $229 million at the time) to pay back its federal loan.

Tesla Model S

Also helpful to Tesla's cause is the fact that it managed to start shipping 500 Model S sedans per week starting in March of this year, exceeding the sales outlook of 4,500 posted in the February shareholder letter. In fact, Tesla managed to sell 4,900 Model S sedans in the first quarter. The automaker plans to deliver 21,000 total for the year, which slightly exceeds previous forecasts of about 20,000.

Tesla reported its first profitable quarter in Q1 2013, where it posted a net income of $11.2 million (a huge increase from an $89.9 million loss in the year-ago quarter). Excluding certain items, Tesla's profit came in at 12 cents a share, which was a boost from a loss of 76 cents a share in Q1 2012. Analysts expected a profit of about 4 cents a share. Revenue also saw a huge year-over-year boost, totaling $562 million (up from $30.2 million in the year-ago quarter).

Tesla is certainly looking to keep that momentum going, and is doing by extending excellent service beyond the point of sale. Last month, the automaker announced a new battery replacement program as well as new service programs, which feature valet for customers who need to send their Model S' to the shop -- and can even borrow (or later buy) a better Model S or Tesla Roadster as loaner vehicles.

Today's early repayment is a crucial point in the history of clean energy loans issued by the Obama administration. Even though DOE said today that losses in the loan program are at 2 percent of a $34 billion portfolio and less than 10 percent of the $10 billion loss reserve, it's hard to forget some of the large loan defaults made by now-bankrupt clean energy companies.

Tesla/SpaceX CEO Elon Musk

In September 2011, Silicon Valley-based solar panel company Solyndra filed for bankruptcy after receiving a $535 million loan from the DOE in 2009. Government officials reportedly warned the administration of the viability of Solyndra, saying the company would go bankrupt in a matter of two years. The warnings were put aside in order to meet political deadlines.

Later in November 2011, Beacon Power, a company that creates flywheels to store power and increase grid efficiency by preventing blackouts, filed for bankruptcy after receiving a $43 million loan guarantee from the Department of Energy in August 2010.

But the failed energy loans didn't end there. Battery maker EnerDel's Ener1 subsidiary filed for bankruptcy in January 2012 after winning a $118.5 million grant from the DOE in August 2009. Ener1 was supposed to develop batteries for electric vehicles.

Just last month, it was announced that California-based Fisker Automotive -- which makes plug-in hybrid electric vehicles -- was talking bankruptcy. The automaker received $529 million in DOE loans in April 2010 for the development of high-tech vehicles. However, Fisker fell a little behind on its production schedule, and in May 2011, DOE froze the loans due to "unmet milestones." Fisker had only drawn $193 million of it at that point.

Due to these frozen loans, Fisker is having a hard time securing funds to make its second car -- the Fisker Atlantic. Fisker is now looking for investors to help out financially, but the company's investor solution has drawn a lot of criticism because two potentials have been Chinese companies -- Zhejiang Geely Holding Group and Dongfeng Motor Group Co. This is seen as an issue because Fisker received U.S. taxpayer dollars to fund its Karma plug-in.

Things have only gotten worse, as Fisker was forced to lay off 75 percent of its staff and even missed its DOE payment in late April.

Thankfully, Tesla has had a better time with its clean auto production. The company can now look ahead to continued Model S success and production of its Model X crossover EV (which hoped to begin production this year, but was shelved to 2014 with deliveries expected in 2015).