PALO ALTO -- Tesla Motors on Wednesday announced an audacious plan to build a $5 billion "Gigafactory" for batteries, saying the massive facility by 2020 will produce more lithium-ion batteries than the entire global supply for 2013. That will be enough, it said, to power 500,000 electric vehicles annually.

A final site has not yet been chosen for the enormous factory, which will occupy roughly 10 million square feet and eventually employ 6,500 workers. But Tesla has narrowed its options to four states -- Arizona, Nevada, New Mexico and Texas -- setting off fierce competition among them to seal the deal. The "green" factory will be largely powered by renewable sources of energy like solar and wind, making any of those states a good location.

A screenshot of Tesla Motors' Gigafactory plan.

Tesla expects to sell 35,000 all-electric Model S sedans in 2014 and is gearing up production of its Model X SUV, which will hit the market in early 2015. By 2017, it plans to begin delivery of its more affordable "Gen III" sedan, which it hopes to sell for about $35,000, about half the cost of the cheapest Model S. But driving down the cost of battery packs is key to making electric cars more affordable.

"By the end of the first year of volume production of our mass market vehicle, we expect the Gigafactory will have driven down the per kWh (kilowatt hour) cost of our battery pack by more than 30 percent," Tesla said in a blog post Wednesday.

But its Gigafactory batteries will not be just for automobiles. Last year, Tesla developed energy storage products for use in homes, commercial sites and utilities in partnership with San Mateo-based SolarCity. The solar company is run by Tesla CEO Elon Musk's cousins Lyndon and Peter Rive, and Musk serves as chairman of SolarCity's board.

"The applications for these battery systems include backup power, peak demand reduction, demand response and wholesale electric market services," Tesla said in a regulatory filing Wednesday. "We plan to ramp sales of these products in 2014."

Each Model S sedan is powered by more than 7,000 lithium-ion battery cells, which Tesla gets from Panasonic. While the battery cells are similar to those used in laptops and game consoles, Tesla's were jointly developed by Tesla and Panasonic specifically for electric vehicles.

Tesla said it will commit $2 billion of its own money to build the Gigafactory and will raise $1.6 billion from investors and the rest from partners. It didn't name its partners in the project, but Panasonic is widely believed to be one of them.

"Panasonic has built a collaborative relationship with Tesla Motors, and are looking at options for strengthening that relationship," a Panasonic spokesman said Wednesday by email. "At this stage, nothing is decided."

Tesla and Panasonic, based in Osaka, Japan, have a strong partnership. Panasonic invested $30 million in Tesla in 2010, and the two companies in 2011 finalized an agreement for Panasonic to provide Tesla with roughly 640 million automotive grade lithium-ion battery cells, or enough to build more than 80,000 vehicles, over the next four years. In October, the scale of that agreement was nearly tripled to 1.8 billion cells.

Those cells will be used in both the Model S and the Model X. But there is speculation that Tesla is talking to other suppliers, including South Korea's LG Chem and Samsung SDI, for cells for the Gen III. Musk has said that "more than one" partner is likely to join Tesla on the Gigafactory.

Tesla also has deals to supply batteries for the Toyota RAV4 EV as well as the Mercedes-Benz B-Class electric vehicle, which is another reason for it to secure a big supply of battery cells.

"I'm surprised they didn't announce who the partners are," said Sam Jaffe, an analyst with Navigant Research. "But I'm not surprised that they didn't name the location. Now they get to be courted by multiple states. Everyone wants manufacturing jobs, and this is a huge factory."

Tesla's Fremont factory is located on a rail line, and Jaffe says that the Gigafactory will also be located near rail to save on the cost of transporting the batteries. Union Pacific runs rail through El Paso, Texas, and Tucson, Ariz., and is building a major intermodal center near Albuquerque, N.M.﻿

At the same time, the only operating lithium company in the country is Rockwood Lithium, which operates in Silver Peak, Nev.﻿ Rockwood was awarded a $28 million grant from the Department of Energy as part of the federal stimulus package to expand production.

Nevada Sen. Harry Reid is a big advocate of clean energy and hosts a National Clean Energy Summit every August in Las Vegas; Musk spoke at the summit in 2012. And Nevada Gov. Brian Sandoval has met with executives from Tesla to make the state's case to be the site of the Gigafactory.

"Tesla is an exceptional company, and we are honored to be included in their list of finalists," said Steve Hill, director of Sandoval's Office of Economic Development. "Our office has been working with the regional development authorities and local governments to highlight what Nevada offers: a skilled workforce, responsive workforce development and training programs, exceptional quality of life, great schools, low operating costs, and a commitment from the state of Nevada to provide the climate necessary for innovative businesses to thrive."