Electric car company Tesla will build a $5 billion factory in Nevada after accepting a hefty incentives package from the U.S. state.

Nevada beat out Arizona, California, New Mexico and Texas for the Tesla plant by offering $1 billion to the company over the next 20 years, mainly in the form of tax breaks.

In exchange, Tesla is projected to create more than 22,000 jobs, including 6,500 permanent positions at the so-called "Gigafactory."

It is also expected to bring in $100 billion to the state's economy in the coming decade.

The battery plant is a joint venture between Japanese electronics giant Panasonic and the California-based Tesla. The pair are looking to build a new generation of electric vehicles at a lower price by 2017 using batteries produced at the Nevada facility.