Governor Arnold Scharzenegger leaked earlier today that Tesla Motors will be partnering with Toyota to build a new electric vehicle. Now, a reliable source close to the deal confirms that this is true — but that Tesla will also be acquiring the recently-closed NUMMI automotive manufacturing plant in Fremont, Calif., potentially bringing back thousands of jobs lost when that facility closed last month.The company’s deal with Toyota has three facets:

1. The joint development  of a brand new,sub- $30,000 electric car, that will contain Tesla’s unique powertrain design, with everything else built by Toyota;
2. The purchase of the NUMMI plant, where Tesla plans to manufacture both its Model S sedan due out in 2012, a new $30,000 Tesla-designed vehicle, and the more affordable jointly designed “third-generation” vehicle;
3. A $50 million investment from Toyota into Tesla when the company goes public, probably later this year.

There’s several pieces of huge news here. Let’s dissect each one of these points:

1. The new car: Tesla clearly realized that the Roadster and Model S weren’t going to cut it — not in a market where the Chevy Volt and Nissan Leaf are going to dominate at a lower price. Tesla would need its own sub-$30,000 car (which would sell for considerably less after likely rebates), in order to survive. But it couldn’t get its costs down on its own, so partnering with a major automaker seemed to be the best course of action. Toyota, which has had a decade’s headstart as the green car leader since the release of its hybrid Prius, was probably also shopping around for a bold, new play in the space to retain its throne.

The design of the car, which probably won’t be released today, will draw largely from an existing Toyota design, our source says.

2. NUMMI: The plant, located in the Fremont, Calif., laid off 4,700 employees (and about as many outside contractors) when it closed its doors on April 1. Our inside source says that when Tesla gets the plant up to speed again, in four to five years — when it plans to launch its car with Toyota — the facility should be employing even more people than it did previously.

At top production levels, the plant could build upwards of half a million vehicles every year. Only a small percentage of these will be Model S units. The as-yet-nameless third-generation vehicle, a high-volume car, would make up the bulk of the inventory, along with the joint Toyota-Tesla design. That’s far from a certainty — the plan still depends on the company’s ability to raise enough capital and scale fast enough to make this third car possible.

There’s no word on the price Tesla is paying for the plant, although the source said the company “got a great price” and that it “otherwise wouldn’t have been able to afford it.” We’ll be looking for this figure in the company’s revised S-1 filing due out next week.

We do know, from our source, that Tesla will be using much of its $465 million loan from the U.S. Department of Energy to make the buy. This means that NUMMI is the site that Tesla has been shopping around for since last year — not one in Downey, Calif., in the Los Angeles area, which was the leading contender.

3. The $50 million: Toyota will be joining Daimler in owning a stake of Tesla after it goes public — a sale that is expected to take place in the third quarter of this year, but there are no guarantees. While the original S-1 pegged the amount expected to be raised in the IPO at $100 million, our source predicted it will probably exceed that amount.

It’s unclear how many shares $50 million will buy Toyota — it will depend on how the shares are priced in the IPO. And the investment won’t represent any new cash for Tesla, since they were going to raise the money anyway. Still, the transaction does solidify Toyota’s endorsement of the company and its technology.

“Both Toyota and Mercedes are saying that Tesla technology is the best,” said our source, offering his interpretation of Daimler and Toyota’s investments.

At the same time Toyota, may get to boost its green image, because Tesla is perceived to be the most cutting edge electric vehicle company in the market — whether that’s merited or not.

Again, this is a pretty radical change of pace for Tesla — and it’s apparently come about very quickly. The company had been interested in the NUMMI facility for a while. It met with the plant’s representatives about three months ago with no results. About a month ago, Akio Toyoda, president and CEO of Toyota, approached Tesla Motors CEO Elon Musk about a potential strategic partnership, and the two executives hit it off, our source says.

That version of events seems to conflict with another account of the deal given by Mario Guerra, a member of the city council of Downey, who said that Tesla CEO Elon Musk told him the deal had come together in just a few days, in explaining why Tesla abandoned its Downey plans.

In 2009, Musk  said he’d love to acquire NUMMI, but dismissed the likelihood of a deal “unless they gave it to us.”

This story, written by Camille Ricketts, was originally posted on VentureBeat's GreenBeat, an editorial partner of AllCarsElectric.