Huawei Technologies Co Ltd is gradually shifting production of chips designed in-house away from Taiwan Semiconductor Manufacturing Co Ltd (TSMC) and towards a mainland Chinese firm in preparation for more U.S. restrictions, sources familiar with the matter said.

The move towards Shanghai-based Semiconductor Manufacturing International Corp (SMIC) comes as Washington readies new rules which would require foreign companies using U.S. chipmaking equipment to obtain a license before supplying chips to Huawei - rules that would directly affect TSMC.

It also highlights how U.S. restrictions against Huawei can act as an impetus for Chinese companies to accelerate the development of homegrown technology.

The U.S. government alleges Huawei, the world’s biggest maker of telecom network equipment and a major smartphone manufacturer, is a national security risk as its equipment could be used by Beijing to spy, and has barred U.S. firms from selling to the Chinese firm without a licence. Huawei has repeatedly denied its products pose a security threat.

Huawei’s chip unit, HiSilicon, began to direct some of its engineers towards designing for SMIC rather than TSMC in late 2019, said one of the sources, who was not authorised to speak to the media and declined to be identified.

Before, Huawei wanted to work with top notch manufacturers, and SMIC was just second-tier,” the person said. “We are now moving resources to SMIC to speed up our help to them.”

A Huawei spokesman called the shift “common industry practice” in a statement to Reuters. “Huawei considers carefully issues such as capacity, technology and delivery when choosing semiconductor fabrication plants,” it said.