(Bloomberg) -- Elon Musk was in dire need of a quick win for Tesla Inc. If that meant flying to China a week after standing up Indian Prime Minister Narendra Modi, then so be it.

The billionaire’s surprise trip to Beijing on Sunday for meetings with officials including Premier Li Qiang paid immediate dividends. Tesla secured tentative approval to deploy its more advanced driver-assistance features in China, potentially boosting revenue in its second-most important market.

Tesla’s China business could use the lift — the company has repeatedly cut prices over the last 18 months to levels that may have completely wiped out earnings from the country. The company’s shares soared as much as 14% before the start of regular trading Monday, extending a post-earnings rally.

The timing suits China, too. The government has been trying to persuade foreign investors that its economy is still open for business, despite government crackdowns and a deflationary crisis. One of the countries it’s been losing out to amid all the upheaval happens to be India, whose leaders Musk left hanging just over a week ago, citing pressing issues for Tesla.

Musk’s trip is “part of the bigger picture of the government in Beijing and local governments wanting to be more open to foreign investment,” said You Chuanman, head of the Chinese University of Hong Kong-Shenzhen’s IIA Centre for Regulation and Global Governance.

For the government, there’s the added bonus of being seen as welcoming to a prominent US business just after President Joe Biden signed into law a bill that forces TikTok’s parent company to sell its stake or be banned from app stores. “That could be considered a signal from Beijing of how different it is for the Chinese government side to accept or welcome foreign investors, while in the US it is the opposite,” You said.

Red Carpet

Musk’s visit was in some ways a return to a safe haven.

Tesla holds a unique position among China’s most-favored foreign companies. It was the first international carmaker to operate without having to form a joint venture with a local manufacturer — an exception not granted to the likes of Volkswagen AG or General Motors Co. The approval for this arrangement was facilitated by Li, the former party chief of Shanghai who is now China’s No. 2 official.

Read More: Musk Loves China, and China Loves Him Back — for Now

That red-carpet treatment contrasts with Tesla’s long-standing impasse with India, whose trade and tax policies have been unwelcoming to foreign carmakers. Musk said in 2022 that Tesla wouldn’t set up manufacturing plants in countries where the company isn’t allowed to first sell and service vehicles.

Tesla’s ties to India showed signs of strengthening in recent months, with expectations building that Tesla may commit about $2 billion to an EV plant, and the government lowering import taxes on vehicles from foreign carmakers that pledge to invest in local manufacturing.

But any such announcement has been put off. Musk scrapped his visit to India a day before he was supposed to land, just as India’s elections were getting underway. The nation’s economic rise is core to Modi’s campaign for a third term.

The trip to Beijing drew the ire of some prominent users of X, the platform formerly known as Twitter that Musk took over in 2022. Television anchor Sumanth Raman questioned why urgent work at Tesla kept Musk from visiting India, but didn’t stop him from traveling to China.

Musk’s postponed India trip may reflect a change in strategy. The CEO announced last week that Tesla was accelerating new models that the company will produce on the same manufacturing lines as its current lineup. Analysts have speculated this could mean the carmaker will further delay a factory in Mexico and put any plant in India on hold.

‘Nice-to-Have’

Foreign automakers have had trouble finding long-term success in the world’s most populous nation. Ford Motor Co. said in 2022 that it was exploring alternatives for its manufacturing facilities in India, a year after announcing it was ceasing production. Toyota Motor Corp. said in 2020 that it wouldn’t expand further due to high tariffs, though it’s since announced plans to make some EV components in the country.

Indian officials are hopeful that Musk will invest in the near future due to recent changes to EV policies, according to a person familiar with the matter, who asked not to be identified because the discussions are private.

Ultimately, Musk’s decision to visit China underscores the sense of urgency to get Tesla back on track. EVs make up only a fraction of India’s car market. In China, approval for the system Tesla markets as Full Self-Driving may help the company claw back some of the market share it’s lost to domestic manufacturers led by BYD Co.

“China is the linchpin to anything Tesla wants to do. China is a must-have market in terms of vehicle sales, and India is a nice-to-have,” said Tu Le, the managing director of consultancy Sino Auto Insights. “Bottom line: Tesla cannot achieve any of its ambitious future goals without continuing to be successful in the China market.”

--With assistance from Bhuma Shrivastava, Advait Palepu and Craig Trudell.

©2024 Bloomberg L.P.