(CNN) — After a miserable couple ofmonths in China, Tesla posted a sharp rebound in sales in June in its most important international market.

The surge came as the world’s second largest economy began easing Covid-related restrictions after months of lockdowns in major cities, and as it makes efforts to boost car sales to support growth.

The US electric car maker sold about 78,000 Shanghai-made vehicles last month, up 142% from May, according to preliminary estimates released by the China Passenger Car Association (CPCA) on Wednesday. The June sales numbers are up 135% from a year ago, the CPCA added.

BYD, the Chinese EV maker backed by Warren Buffett, was nipping at Tesla’s heels, with 69,544 fully electric vehicles sold last month, according to a statement from the company earlier this week.

Tesla’s sales of Chinese-made vehicles were strong at the start of this year, ranking the carmaker first among pure electric brands. It delivered 65,814 vehicles from its Shanghai factory in March, with the majority of those sold in the Chinese market. That number was up 85% from a year ago.

That was before authorities shut down Shanghai for two months to contain the city’s worst Covid outbreak. Tesla’s factory in Shanghai was shut for several weeks in April. The company’s production remained limited even after the plan reopened, as it struggled to get parts from suppliers.

In April, Tesla’s sales dived 98% from March to 1,512 vehicles. In May, deliveries recovered to 32,165, but remained way below the levels reached earlier this year.

BYD, meanwhile, escaped the country’s sweeping lockdowns. In April, BYD dominated the market, selling a record 106,000 new energy vehicles (NEV), up more than 300% from a year earlier. Among them, 54% were fully electric, while the rest were plug-in hybrids. In May, BYD’s NEV sales continued to climb, surging to more than 114,000 units.

Analysts have attributed BYD’s resilience in sales to its “vertical integrated supply chain.” The business model has made BYD less vulnerable to supply chain disruptions during the lockdowns, while rivals had to cut back production because of chip and battery shortages.

China’s overall car market slowed in April and May, as stringent lockdowns hit vehicle production and hampered sales. The market has now begun to pick up, as the country begins reopening gradually.

According to initial estimates by CPCA on Wednesday, passenger car sales jumped 22% in June from a year ago, reversing May’s 17% decline.

Tesla has also accelerated production at its Shanghai factory. In a statement last week, the company said the issues Tesla faced in the early months of the quarter are now mostly behind it.

“Despite ongoing supply chain challenges and factory shutdowns beyond our control, June 2022 was the highest vehicle production month in Tesla’s history,” it said.

Authorities in China are rushing to bolster growth as Covid lockdowns battered the economy and caused soaring unemployment.

The Ministry of Commerce announced Thursday that the government is studying extending tax exemptions for electric cars.

Beijing has exempted buyers of NEVs from paying the 10% purchase tax since September 2014. But that policy is scheduled to end atthe end of this year.

— CNN’s Chris Isidore contributed to this report.

(Copyright (c) 2024 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox