After the coronavirus outbreak caused a nationwide shortage of face masks in January, Chinese officials were quick to ensure that Tesla Inc. wouldn’t be left without.
China’s government helped the California-based carmaker secure the sought-after supplies that allowed it to reopen at a time when many of its competitors were still shut down. Tesla received 10,000 masks, cases of disinfectant that require a government permit, thermometers and other materials that allowed the company to restart its factory near Shanghai the first working day after the extended Lunar New Year break, according to state-run media.
The support for Tesla — which also included providing accommodation for some employees as the outbreak snowballed — is emblematic of China’s wider embrace of Elon Musk’s car venture. The billionaire has waged a charm offensive since deciding to build his first plant outside the U.S. in China, home to the world’s biggest electric-vehicle market, and has been rewarded with the support of officials even as the trade war strained relations with the U.S.
That backing is crucial for Musk’s vision to make China a centerpiece of his automotive ambitions, but also serves a purpose for Beijing, with Tesla’s new factory south of Shanghai becoming a symbol of the government’s efforts to open the economy to global competition and be the world’s EV pioneer.
“Given Tesla’s image of having advanced electric-vehicle technology and expected strong demand for made-in-China Tesla Model 3s this year, no local government anywhere in the world would neglect such a new project,” said Yale Zhang, founder of AutoForesight, a Shanghai-based consultancy.
As Beijing pushed local authorities to get the country back to work last month, officials in Lingang singled out Tesla as an example of their success in helping the area’s industry to recover.
The management committee of Lingang “will make all efforts to help key companies including Tesla return to normal production,” Xu Wei, a spokesperson for the Shanghai municipal government, said at a briefing in February. Tesla representatives in China declined to comment on the help it received from authorities.
Tesla has been impacted along with the broader auto sector in China as the virus prompts customers to stay home, causing a historic plunge in car sales. But the support allowed the automaker to recover from shutdowns aimed at slowing the virus’ spread that virtually paralyzed industry in China. A gauge of Chinese manufacturing plunged to a record low in February, according to government data.
Besides the protective materials, Chinese authorities helped arrange dormitories for hundreds of Tesla employees, as well as transport to and from the plant amid the turmoil. Shanghai Lingang Human Resources Co., a government-backed agency that coordinates hiring in the area, said it has helped Tesla add more than 100 new workers since the outbreak, plus it’s assisted with virus screening and online interviews.
Authorities are also trying to ensure that Tesla’s parts suppliers in China resume production as soon as possible by providing epidemic-prevention materials, Sun Xiaohe, a local official in charge of assisting Tesla, told state media. Catering was also arranged, they reported.
While other automakers such as China’s Zhejiang Geely Holding Group Co. also received masks and other support, the actions to help Tesla have been trumpeted in state media and by local government-backed outlets. Footage of locally built Model 3 sedans being assembled amid the epidemic have proliferated on TV and online.
Even before the virus, a swift regulatory-approval process enabled Tesla to start deliveries to customers in China in January, a year after it first broke ground on the factory.
“The Gigafactory project illustrated the cooperation between Tesla and the Shanghai government, and that the city has improved its business environment,” Wu Qing, deputy mayor of Shanghai, said at a ceremony that saw Tesla hand over its first China-made car.
Local banks provided financing for Tesla’s China push, including a $1.6 billion injection announced at the end of last year. The acquisition of land for the plant and a slew of local permits were cleared swiftly, and the factory was hooked to the nation’s power grid quicker than the average for other firms.
As the facility was being planned and local permits were pending, Musk visited China often for meetings with figures ranging from Alibaba Group Holding Ltd. founder Jack Ma to Transport Minister Li Xiaopeng and other government officials. He met with Premier Li Keqiang in Zhongnanhai, the leadership compound next to the Forbidden City in central Beijing where the country hosts its most high-profile foreign visitors. Musk was also photographed eating steamed buns during a visit to the capital last year.
Soon afterward, Tesla obtained an exemption from China’s 10% sales tax on cars. Typically, only electric vehicles made by Chinese companies have been exempt.
“The fact that Tesla received significant government support to overcome the current crisis shows China is delivering its promises to treat foreign firms on equal footing with local ones,” said Ivan Su, an analyst at Morningstar Inc. in Hong Kong.
More must-read stories from Fortune:
—Business is finally starting to reckon with climate change
—How mainland China’s closest neighbors have kept coronavirus cases so low
—Plastic that travels 8,000 miles: The global crisis in recycling
—How the world’s most densely-populated region fought off the coronavirus
—Listen to Leadership Next, a Fortune podcast examining the evolving role of CEO
—WATCH: Rethinking your travel plans because of coronavirus?
Catch up with Data Sheet, Fortune’s daily digest on the business of tech.