BEIJING - Beijing on Thursday said it "firmly opposes" trade restrictions included in a new U.S. defense act, having already admonished the bill for interfering in China's internal affairs.

The National Defense Authorization Act (NDAA) — signed into law last week — bars the use of federal funds to buy railcars and buses from China, and slows the lifting of sanctions on tech giant Huawei.

It comes as Beijing and Washington have agreed to a temporary truce in their bruising nearly two-year trade war, with a "phase-one" deal that has rolled back tariffs on billions of dollars worth of goods.

"We have noted that the U.S. defense authorization act... contains a number of adverse provisions against Chinese enterprises, which China firmly opposes," Chinese commerce ministry spokesman Gao Feng said at a regular briefing.

The act is expected to dent the bottom lines of two Chinese companies: state-owned railcar maker CRRC Corp. and BYD Motors, which sells electric buses in the US.

New restrictions contained in the bill prevent Washington from taking Huawei off a U.S. Commerce Department list that bans American firms from working with the company without specific exemptions.

U.S. intelligence chiefs claim Huawei's equipment is a threat to national security as the United States and other nations introduce next-generation mobile networks.

"China will pay close attention to the impact on Chinese enterprises during the implementation of the bill, and take all necessary measures to protect the legitimate rights and interests of Chinese enterprises," Gao said, without offering details of the possible countermeasures.

U.S. trade representative Robert Lighthizer had said China had agreed to purchase $200 billion worth of American goods over the next two years as part of the mini-deal, but the Chinese side is yet to confirm the details.

"At present, China and the United States are carrying out the necessary procedures of legal review, translation and proofreading, and are in close communication on the subsequent steps toward signing the agreement," Gao said.

The NDAA also calls for strengthening Washington's ties with Taiwan and support for Hong Kong's pro-democracy protestors — measures which on Saturday Beijing said "blatantly interfered" in its internal affairs.