Photo/Illutration Customers wearing face masks to help curb the spread of the coronavirus look at a newly unveiled model from an American bicycle brand at a retail shop in Beijing on July 29. (AP Photo)

BEIJING--China’s trade growth accelerated in September as the world’s second-largest economy recovered from the coronavirus pandemic.

Exports rose 9.9 percent over a year earlier to $239.8 billion, up from August’s 9.5 percent growth, customs data showed Tuesday. Imports gained 13.2 percent to $202.8 billion, up from the previous month’s 2.1 percent contraction.

Exporters have benefited from China’s relatively early reopening from its shutdown to fight the virus and from global demand for masks and medical supplies. They are taking market share from foreign competitors that are hampered by anti-disease controls.

China’s global trade surplus swelled 6.6 percent over a year earlier to $37 billion but was down sharply from August’s $58.9 billion gap.

Exports to the United States rose 20.5 percent over a year ago to $44 billion despite higher U.S. tariffs in a fight with the Trump administration over Beijing’s technology ambitions and trade surplus. Imports of American goods rose 24.5 percent to $13.2 billion.

China became the first major economy to rebound to pre-virus growth levels in the second quarter of the year. The government reported 3.2 percent economic growth over a year earlier. Forecasters expect that to accelerate in the three months that ended in September.

Automakers and other large manufacturers are back to normal activity, helping to drive demand for imported iron ore, copper and other industrial materials.

Importers have benefited from a slump in prices of oil and other commodities due to weak demand.

Retail sales are weaker as consumers who are uneasy about possible job losses put off major purchases. Consumer spending returned to pre-virus levels in August but was only 0.5 percent above a year earlier.

Economists have warned some Chinese exporters of smartphones and other high-tech goods might face trouble due to restrictions imposed by Washington on their access to U.S. components on security grounds.

Washington has cut off supplies of components for companies including China’s most prominent tech brand, Huawei Technologies Ltd.

The Trump administration is lobbying European and other allies to avoid Chinese suppliers as they upgrade to next-generation telecom networks. That could weigh on exports of technology products Beijing is promoting to propel economic development.