Reports have surfaced that Tesla has struck a deal to build a factory in Shanghai’s free trade zone.

China is a lucrative market but a difficult one to crack, given that foreign companies generally partner with a local brand, such as the SAIC-GM alliance. This arrangement forces the alien company to give up some profits and share details about technology in exchange for access to the highly lucrative Chinese auto market.

It’s no secret Tesla wants to hang onto its independence as badly as it wants to ramp up its presence in the Chinese market, so this solution may be ideal for it. According to Wall Street Journal sources, this deal with the Shanghai government would allow Tesla to build a “wholly-owned factory” in the city’s free trade zone.

This arrangement would not necessarily skirt the 25-percent import duty currently slapped on foreign cars. However, it would likely reduce production costs by an tremendous amount and significantly lower Tesla’s shipping expenses. Currently, Tesla is on the hook for both the tariff and prohibitive shipping costs, both of which hamper the potential for further growth in what has rapidly become one of the world’s most important car markets.

If such a deal is in place to build a factory in Shanghai, it would assist Tesla greatly in lighting a fire under their efforts to become a large EV player in the Chinese market … not that they’re doing terribly shabby right now given the circumstances.

Halfway through 2017, Tesla sales in China reached nearly $1 billion, compared to $2.8 billion in its home market of the United States. During the same period last year, Tesla saw $252 million in sales. The Chinese internet company Tencent Holdings Ltd has a 5% stake in Tesla.

Right now, China is implementing new incentives to spur EV adoption, replacing expiring subsidies and pushing automakers to more make more aggressive investments in future EVs. Chinese companies like BYD and Geely have a have a home-field advantage over Tesla, needing not worry about tariffs and benefiting from local government support. Geely sold about 7000 electric cars in the first half of this year, or about 1% of its total sales. Sales of EVs at BYD are even greater.

Those two companies also have another advantage over Tesla – they’re making a profit.