Tesla is closing in on a deal to begin production of its cars in China, after it signed a preliminary agreement to explore building cars near the major city of Shanghai.

By signing the preliminary agreement, Tesla will begin the first step towards local production in China, a move that would significantly lower costs.

More importantly, it will help Tesla avoid China's 25 percent import tax currently placed on Tesla cars brought in from the United States.

DON'T MISS: Tesla and China: why an obvious match isn't as simple as it seems 

Bloomberg reports Tesla will more clearly define its production goals in the country by the end of the year, citing a statement from the automaker.

Local Chinese production will "ensure affordability for the markets they serve,” Tesla's statement went on to say.

Tesla Model 3 design prototype - reveal event - March 2016

Tesla Model 3 design prototype - reveal event - March 2016

Most of Tesla's production is slated to remain in the United States and the Netherlands for American and European consumers, respectively.

Building cars in China will help tap the market's booming demand for electric and hybrid vehicles all while padding Tesla's growing revenue.

Last year, about 15 percent of Tesla's $7 billion in revenue came from China; China has plans to build 500,000 new energy vehicles beginning next year.

READ THIS: Tesla Model 3: beta phase to be skipped, will go straight to production?

Tesla's preliminary agreement would allow the automaker to build facilities in Shanghai’s Lingang development zone.

However, per China's existing laws and regulations, Tesla must set up a joint venture with at least one Chinese company to obtain the necessary manufacturing permits.

The joint venture will mean Tesla must give 50 percent control to a Chinese company and share intellectual property.

Tesla Model 3 Driving on a Public Road

Tesla Model 3 Driving on a Public Road

China is the second largest source of Model 3 pre-orders as well.

The affordable electric vehicle's success in China likely rests on the automaker's ability to produce the cars locally; the Model 3 will be priced at $35,000 before any incentives, here in the U.S.

CHECK OUT: Tesla Model 3 prices: reader makes his guesses, via spreadsheet

Tesla is scheduled to begin Model 3 production at its plant in California next month.

In the near future, however, Tesla could finally begin achieving the necessary economies of scale with Chinese production.

_______________________________________

Follow GreenCarReports on Facebook and Twitter.