San Francisco, Oct 23 : Electric car maker Tesla has struck a deal with the Chinese government to establish a manufacturing facility in Shanghai, a media report said. The production options for manufacturers in China are limited by the government. One option is to set up a joint venture, sharing much of their technology and profits with a Chinese partner while other is to manufacture in a free-trade zone in China, protecting their secrets but forking over steep tariffs. The deal would allow the auto maker to build a wholly owned factory in the city's free-trade zone enabling Tesla to cut down production costs, but it would still likely incur China's 25 per cent import tariff, The Wall Street Journal reported. Being inside a free trade zone means that unless Tesla can negotiate a special exemption, the cars could still be subject to China's steep tariffs -- treated as though they were still being shipped from outside China even though they were being produced in the country, the New York Times said. According to Fortune, Tesla has been pursuing a Chinese factory for years and the Shanghai deal started to come into focus in June. Tesla has sold $1 billion worth of cars in China in 2016 and it had accepted a large investment from Tencent Holdings, a technology giant in China. LMC Automotive, a global consulting firm, estimates that 295,000 battery-electric cars will be sold this year in China, compared with 287,000 in the rest of the world combined.