Tesla Motors has settled on a home for its powertrain factory and new headquarters.

The electric automaker will lease and renovate a 369,000 square foot, three-building complex on 23 acres of land in the Stanford Research Park in Palo Alto, Calif., Tesla said Tuesday. The space formerly housed Hewlett Packard and and its spin-off, Agilent Technologies.

Tesla plans to move its 350 employees from the current headquarters in the nearby city of San Carlos and make powertrain components there for its own cars and other customers.

The company is receiving federal loans for the project. In June, the U.S. Department of Energy said Tesla would receive $100 million for building a powertrain factory and another $365 million for engineering and assembling the Model S, a sedan that the company plans to launch in late 2011.

Back then, Tesla said it would locate the powertrain factory in the San Francisco Bay Area.

The company said earlier this year that it would build a Model S factory in Southern California because it would be easier to find a previously used manufacturing site in the region. Tesla CEO Elon Musk said at the time that the federal government preferred to give loans to companies on sites that already have been used for manufacturing for at least 20 years.

The company hasn't announced the location of the Model S factory. It previously had been eyeing an undeveloped patch of land in San Jose as the factory site.

Tesla plans to start construction of the powertrain factory and new headquarters within a few months.

The company, founded in 2003, recently said it reached profitability for the first time during the month of July (see Tesla Posts $1M Profit). The company achieved that milestone thanks to the sale of its first model, the sporty Roadster, Tesla said.

With growing Roadster sales and its federal loans, Tesla appears to be making good progress toward building and launching the Model S, which will comprise the second line of cars the company wants to sell.

It wasn't so long ago when Tesla was running out of money and had to raise funds from existing investors, including Musk himself (see Cash Strapped Tesla Raises $40M, Loses Lawsuit).

The Model S would have a starting price of $57,400, about half the price of the Roadster. Tesla hopes to attract a broader set of customers with the Model S and has touted the car's roomy interior in a bid to attract families (see Can Tesla Impress the Masses?).

The company is making money by designing and selling powertrain components for other customers, but the only announced customer so far is Daimler.

Daimler plans to use Tesla's battery packs, chargers and software for up to 1,000 of its Smart electric cars. The German automaker plans to start assembling the cars before the end of the year.

Daimler also has taken a near 10 percent stake in Tesla.

Tesla said it plans to announce more powertrain contracts in the coming months.  

Image courtesy Tesla Motors.