On Tuesday, Tesla Motors’ Elon Musk opened the doors to the Gigafactory – a $5-billion project with the capacity to double the world’s production of lithium-ion batteries and maybe even fuel the CEO’s increasingly ambitious goals.

Construction is not finished, but the factory is ready to begin low levels of production. When completed, the factory plans to cover 10 million square feet of the Nevada desert, making it one of the largest buildings in the world. According to Tesla, if the Gigafactory is operating at full capacity it will be able to produce 150 gigawatt hours of energy every year – enough to power New York City for about three years – and reduce the cost of batteries by a third by 2018.

Tesla currently contracts out battery production to Japan, but producing their own batteries in America will allow the company to expand production, have more control over prices, and dive deeper into the long-term energy storage side of the business.

“If you look at where batteries are being made, it’s almost all in Asia,” JB Straubel, Tesla’s chief technical officer and co-founder, told the Wall Street Journal. “That was one of the big opportunities we have here, is to close the logistics loop from where cells are made and materials are made and move it closer to where our vehicles are made.”

In the short term, Tesla needs batteries for the production of the Model 3 sedan, the fourth car the company has designed, which is scheduled to roll off factory floors at the end of 2017. At $35,000, the car will be Tesla's most affordable, due in part to lower battery costs. Because of the high initial orders for the Model 3, Tesla decided to try to increase production to 500,000 vehicles per year by 2018, two years earlier than scheduled.

But the batteries will also be vital to the success of the master plan Musk released earlier this month outlining the company’s goals for the next ten years, which include developing home solar panels and battery storage; moving beyond luxury cars to produce electric pickup trucks, sedans, and even semi-trucks; delving into safe autonomous technology; and creating a car sharing system that will earn car owners money.

Part of the company's future rides on the production of these batteries, and Musk is known to set aggressive – some say unrealistic – goals.

With the help of partner company Panasonic Corp., which invested $1.6 billion, machines are currently being installed at the factory so that battery production can begin by the end of the year, as nearly 1,000 workers continue construction.

"We have to be ready with cell and pack production well ahead of vehicle production," Straubel told the Wall Street Journal. "We're accelerating our construction plans and accelerating our planned ramp up of cell production."

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Some are skeptical that the gigafactory will be able to save Tesla as much money as it anticipates, particularly at first. Analysts told NBC News that while producing batteries in house could bring down the costs, in could also be risky if Tesla or Solar City products don't sell as well as expected.

"They could be left with a lot of excess capacity in the near term," Sam Abuelsamid, an analyst with Navigant Research, told NBC. He added that advances in battery technology could prove expensive for Tesla in the future.