Tesla's aspirations in China were dealt a major blow at the weekend after the government ordered that almost all the cars it has sold in the country – more than 285,000 of them – be fixed to address a safety issue. The State Administration for Market Regulation said on Saturday that the action involves 211,256 locally produced Model 3 vehicles and 35,665 imported ones, as well as 38,599 China-made Model Ys. The California-based electric car maker only began deliveries of the Model Y sports-utility vehicle in January, so the recall will affect pretty much every driver who bought one. The Chinese agency said the vehicles’ autopilot systems can be activated automatically, potentially leading to crashes from sudden acceleration. In most cases, the fix should be able to be made remotely with an online update to the cars’ active cruise control feature. Tesla will upgrade the software for free. While Tesla apologised via its official customer support account on Weibo, saying that it will “continue to improve safety in strict accordance with national requirements”, the recall tops a string of embarrassing setbacks for the company in China. A protest that went viral at the Shanghai car show in mid-April and a spate of crashes has soured public opinion towards the EV pioneer. Furthermore, a few local governments and official institutions are reviewing Tesla ownership among their staff, citing concerns the cars pose security risks. In March, Teslas were banned from some military complexes and housing compounds because of worries about inbuilt cameras. Tesla immediately moved to reassure authorities, saying any data collected in China is stored locally. That the required software fix affects Tesla's Model Y is especially unfortunate. The SUV crossover, which has a driving range of up to 594 kilometres (369 miles), allowed Tesla to focus on a much bigger customer base in the world's biggest market for EVs and cars overall. Chief executive Elon Musk has said the Model Y has the potential to outsell all other vehicles it makes. This month, China's Passenger Car Association forecast increased interest in larger, roomier cars, particularly in the seven-seater category, as government rules allow parents to have more children. Credit Suisse said in a note last week that one key downside risk to its $800 price target for Tesla stock is Model Y difficulties and a lack of demand in international markets. Tesla's Nasdaq-traded shares closed Friday at $671.87 and are down about 5 per cent since January. They rose by 743 per cent last year. Tesla’s delivery times at some locations in China “have declined from 39 to 33 days – potentially an indication of fewer orders converting to sales”, Credit Suisse analyst Dan Levy wrote. However, while some customers have switched brands due to recent negative headlines, “there are still ample Model Y orders to support continued sales volume”, Levy said. Foreign brands accounted for about 37 per cent of new-energy vehicle sales in China last year and 57 per cent this year. The nation is Tesla’s second most-important market after the US and it is now exporting China-made cars to Europe from its Shanghai Gigafactory. But a handful of fast-growing, home-grown upstarts threaten its strong position, particularly Nio and Xpeng. In the mass market, local buyers are being won over by cheap, functional electric cars made by SAIC-GM-Wuling Automobile Company. Sales of China-made Model Ys, which start from around $53,000, more than doubled in May from April. April’s figures were down on March because some production lines at Tesla’s Shanghai factory were suspended for two weeks for maintenance and adjustment. "Once the Model Y gets to full production, we will probably see a ratio of almost two-to-one" versus the Model 3 sedan, Tu Le, the managing director of Beijing-based consultancy Sino Auto Insights said earlier this month. “Chinese consumers love SUVs and crossovers. I think the Model Y is going to do really well towards the end of this year.”