An employee positions a Tesla Model S automobile during the battery-pack fitting on the final assembly at a Tesla factory in Tilburg, Netherlands, in 2015. (Jasper Juinen/Bloomberg)

In 2008, Tesla planned to make a costly shift from building sports cars to more family-friendly sedans, just as the recession began. At the time, the then-five-year-old company had sold only 1,500 Roadsters but aimed to bring its all-electric vehicles to a broader audience. For financial assistance, it turned to a brand new federal loan program.

Two years later, the Advanced Technology Vehicle Manufacturing loan program provided Tesla with $465 million just six months before the company went public. With help from the loan, Tesla built out its production facility in Fremont, Calif., and launched the Model S sedan in 2012. The company has since sold roughly 150,000 of them globally, company records show.

“It helped move them to the next step,” said Michelle Krebs, a senior analyst at Autotrader.

Now, President Trump has proposed eliminating that program as part of deep budget cuts that could have an impact on more than 18 federal departments and agencies. The Energy Department, which could see a 6 percent cut totaling $1.7 billion, runs the ATVM program.

“The private sector is better positioned to finance disruptive energy research and development and to commercialize innovative technologies,” the administration said in its newly release budget blueprint. The justification echoes past arguments from Republicans who contend that the program uses taxpayer money to make risky business loans.

Tesla CEO Elon Musk is part of a business council advising the White House. The company declined to comment, and pointed to a blog post about repaying the loan.

The ATVM program has issued only five loans since President George W. Bush signed it into law in 2008 to support the development and production of fuel-efficient vehicles. The program, which still has as much as $16 billion to lend, claims to have created or preserved 35,800 jobs, many in manufacturing, and to have funded innovations that saved consumers more than 1.6 billion gallons of gasoline.

“It creates jobs, it promotes U.S. manufacturing and it helps build our lead in the global advanced-technology race,” said Genevieve Cullen, president of the Electric Drive Transportation Association. “Those are all things that this administration supports.”

The program was enacted at the dawn of the Great Recession as the federal government was lending billions to rescue General Motors, Chrysler and others from financial peril — an early source of confusion as to whether the program was just another financial lifeline. The loan to Tesla, as well as loans to Ford and Nissan, came when households and corporations alike found it exceptionally difficult to secure new lines of credit, Krebs said.

But the program’s last loan was issued in 2011 to a company that later went bankrupt. Though it was revamped in 2014 to include auto parts suppliers, private investment capital was already less expensive and more readily available by that time.

“It wouldn’t be devastating for this to go away because it came into being at a very different time,” Krebs said.

The ATVM program has had its funding threatened before. In 2014, Rep. Paul D. Ryan (R-Wis.) unveiled a budget that cut funding for the program, the Hill reported. Last year, Republicans tried unsuccessfully to phase out the program as part of a water projects bill, according to the Detroit News.

The program has had a mix of success and busts.

Ford was granted a loan worth $5.9 billion in 2009 to upgrade 13 manufacturing facilities in six states, a project that ATVM claims helped to “create and preserve” 33,000 jobs. Those facilities have since produced more fuel-efficient versions of the Escape, Focus, Fusion and F-150, among other vehicle models, according to the ATVM website.

“It was an important program at that time,” said Ford spokeswoman Christin Baker. “We had a plan in place already to transform and retool our facilities and this loan helped us to accelerate those plans.”

Nissan received $1.45 billion in 2010 to build or update facilities in Tennessee where the company makes batteries, paints cars, and assembles the all-electric Nissan Leaf. That project created 1,300 jobs, according to ATVM.

Both loans are still in good standing, an Energy Department spokesman said.

ATVM also approved a $529 million loan to Fisker Automotive, an electric carmaker that later filed for bankruptcy. The department had disbursed $192 million of that loan and only recouped about a quarter of that amount.

The most recent loan, worth $50 million, was issued in 2011 to Vehicle Production Group, or VPG, which made wheelchair-accessible taxicabs before also going under. The department recovered $7 million of the $49 million it had already paid to the company.

Tesla repaid its loan in 2013, nine years ahead of schedule. Musk, at the time, offered thanks to American taxpayers. “I hope we did you proud,” he said.

Read more from The Washington Post’s Innovations section