There are few markets Tesla CEO Elon Musk covets more than China — and for good reason, considering it is not only the world’s largest automotive market but also the biggest outlet for battery-electric vehicles like the California carmaker’s new Model 3.

Until now, however, demand has been marginal, with potential Tesla buyers wary of having to absorb the 25 percent tariff China levies on automotive imports. After spending several frustrating years trying to win approval to build a new Chinese assembly plant that would sidestep those duties, Musk hinted during Tesla’s recent earnings call that plans are imminent and could be announced in a matter of weeks.

But there are growing concerns among industry observers that Tesla’s plans could be derailed by the growing trade war between the U.S. and China — and, in particular, by the possibility that President Donald Trump's administration might take steps to limit Chinese investment in U.S. companies, especially those in high-tech fields.

“It could be a major problem,” analyst Joe Phillippi of AutoTrends Consulting told NBC News. “Theoretically, it could prevent investment” in the factory Tesla plans to build because, under current Chinese law, foreign auto manufacturers have to enter into a joint venture with one of Beijing’s domestic car companies.

Rumors have been swirling in recent days that Treasury Secretary Steven Mnuchin is working up a plan to restrict Chinese investments. On Wednesday, he told CNBC, "We are not singling out China, but we will protect technology transfer to China as we will to other important areas."

"We will have the necessary tools to protect investments, whether it's China or anybody else," Mnuchin said.

While such a threat might, at first glance, appear to focus on areas involving military, consumer electronic or other high-tech fields, it also could cover the auto industry, according to Phillippi and other analysts.

Indeed, U.S. automakers have complained for years that they have been aggressively targeted by the Chinese. That goes beyond traditional corporate espionage. Through their joint ventures with foreign manufacturers, Chinese automakers have been able to gain access to their partners’ technology, using it to make themselves increasingly competitive. Meanwhile, foreign automakers have long groused that they find little relief from China’s courts when trade secrets and intellectual property are illegally appropriated by Chinese competitors.

Tesla could be particularly vulnerable to any restrictions on Chinese investment because of the company’s underlying reliance on advanced technology. Few fields have become more competitive than advanced battery design and manufacturing, and Tesla’s batteries are finding a variety of uses beyond its vehicles. Among other things, they’re being used for home and office energy storage devices, a field that is expected to grow exponentially over the coming years.

Musk has made it clear that any new Tesla plants, including one in China, would not only assemble vehicles but also produce batteries and other components, such as its electric motors. That’s another high-tech field in which the Chinese have been making a push for dominance.

Were Tesla’s plant project to be derailed it would come as a bit of irony. Musk has encouraged the Trump administration to crack down on China’s trade policies which, he suggested earlier this year, limit foreign manufacturers much “like wearing lead shoes in an Olympic race.”

Tesla did not respond to a request for comment.