SHANGHAI: China stocks clawed back from earlier losses to close higher on Tuesday, helped by gains in tech firms as Beijing pushes for self-sufficiency in the sector amid a protracted trade war with the United States.

The blue-chip CSI300 index rose 0.1 per cent, to 3,853.61, while the Shanghai Composite Index added 0.2 per cent, to 2,930.15.

China has lodged a complaint against the United States at the World Trade Organization over US import duties, the Chinese Commerce Ministry said on Monday.

The trade war's impact on China's economy is limited, said Kim Eng, S&P's primary sovereign analyst for China. "I would not expect US tariffs by themselves to cause the Chinese economy to weaken so much that we have to lower the rating," Eng said.

There's also expectation that Beijing would be ready to intervene to prevent sharp market selloffs ahead of the 70th anniversary of the founding of the People's Republic of China on Oct. 1.

Sector performance was mixed for the day. Healthcare firms lagged as Beijing expanded a drug bulk-buy programme.

Leading the gains, the IT and telecommunications sectors closed up 2.6 per cent and 2.9 per cent respectively, as investors cheered Beijing's continued push for tech independence amid the bruising trade war with the United States.

On the newly launched STAR Market, all of the 28 listed firms posted gains of more than 4 per cent, with Espressif Systems surging the maximum allowed 20 per cent.

For the first half of the year, profitability improved for most emerging industries in the A-share market, with cloud computing, 5G, high-end manufacturing and Internet of Things recording far higher profit growth rates, analyst at China Merchants Securities said in a report.

Around the region, MSCI's Asia ex-Japan stock index was weaker by 0.73 per cent, while Japan's Nikkei index closed up 0.02 per cent.

At 07:14 GMT, the yuan was quoted at 7.1828 per US dollar, 0.15 per cent weaker than the previous close of 7.1717.

The largest percentage gainers in the main Shanghai Composite index were Saurer Intelligent Technology Co Ltd , up 10.08 per cent, followed by Tianjin Quanyechang Group Co Ltd, gaining 10.04 per cent, and Wuhan DDMC Culture Co Ltd , up by 10.04 per cent.

The largest percentage losers in the Shanghai index were Well Lead Medical Co Ltd, down 9.48 per cent, followed by TVZone Media Co Ltd, losing 9.07 per cent, and Ecovacs Robotics Co Ltd, down by 5.05 per cent.

About 18.90 billion shares were traded on the Shanghai exchange, roughly 116.1 per cent of the market's 30-day moving average of 16.28 billion shares a day. The volume in the previous trading session was 20.28 billion.

As of 07:15 GMT, China's A-shares were trading at a premium of 29.40 per cent over the Hong Kong-listed H-shares.