Nevada has vanquished its foes in the hunt for Tesla's multi-billion dollar "Gigafactory" battery plant.

"It's a great day in Nevada, and it's a great day for Nevada," said Governor Brian Sandoval at a press conference to announce the facility.

The deal was announced Thursday after months of wrangling between California, Texas, Arizona and New Mexico. It will cost the state $1.25 billion in tax breaks and other incentives, Sandoval said. It is expected to generate $100 billion in "economic impact" over the next 20 years.

Related: Tesla's future rides on massive battery plant

The Governor also said about 6,500 jobs will be created directly at the plant, but as many as 22,500 jobs will be created in the state because of the project. The state's economic development office estimates that the factory will add $1.9 billion to state and local coffers over the next two decades, with a quarter of it going to K-12 education.

Tesla (TSLA)'s massive factory, which could cost an estimated $4 billion to $5 billion is aimed at easing the path to a cheaper electric car, the Model 3. The key is reducing the cost to build more of the lithium-ion batteries that its cars use.

Tesla hopes the Model 3 will cost between $30,000 to $40,000. The flagship Model S costs nearly $70,000 and Tesla's upcoming crossover, the Model X, will cost about that much. Panasonic (PCRFF) will partner with Tesla on the Gigafactory, which broke ground in July.

Related: Consumer Reports calls the Model S the best car ever, with caveats

The lion's share of Tesla's incentives are in taxes it won't have to pay, reports the Reno Gazette-Journal. That means $725 million in sales tax breaks over 20 years and $332 million in property tax breaks over 10 years, with most of the rest coming from tax credits.

The battery factory will also get $8 million in discounted electricity rates, the paper said. Tesla will be allowed to sell its cars directly in Nevada without a franchise agreement, which has been a sticking point in other states.

"The Gigafactory is an important step in advancing the cause of sustainable transportation and will enable the mass production of compelling electric vehicles for decades to come," Tesla CEO Elon Musk said in a statement.