(Adds Chinese foreign ministry comment)

By David Shepardson and Diane Bartz

WASHINGTON, Dec 27 (Reuters) - President Donald Trump is considering an executive order in the new year to declare a national emergency that would bar U.S. companies from using telecommunications equipment made by China's Huawei and ZTE, three sources familiar with the situation told Reuters.

It would be the latest step by the Trump administration to cut Huawei Technologies Cos Ltd and ZTE Corp , two of China's biggest network equipment companies, out of the U.S. market. The United States alleges that the two companies work at the behest of the Chinese government and that their equipment could be used to spy on Americans.

The executive order, which has been under consideration for more than eight months, could be issued as early as January and would direct the Commerce Department to block U.S. companies from buying equipment from foreign telecommunications makers that pose significant national security risks, sources from the telecoms industry and the administration said.

While the order is unlikely to name Huawei or ZTE, a source said it is expected that Commerce officials would interpret it as authorization to limit the spread of equipment made by the two companies. The sources said the text for the order has not been finalized.

The executive order would invoke the International Emergency Economic Powers Act, a law that gives the president the authority to regulate commerce in response to a national emergency that threatens the United States.

The issue has new urgency as U.S. wireless carriers look for partners as they prepare to adopt next generation 5G wireless networks.

The order follows the passage of a defense policy bill in August that barred the U.S. government itself from using Huawei and ZTE equipment.

China's Foreign Ministry Spokeswoman Hua Chunying said that she did not want to comment on the order as it had not been officially confirmed.

"It's best to let facts speak for themselves when it comes to security problems," Hua said.

"Some countries have, without any evidence, and making use of national security, tacitly assumed crimes to politicize, and even obstruct and restrict, normal technology exchange activities," she added.

"This in reality is undoubtedly shutting oneself off, rather than being the door to openness, progress and fairness."

Huawei and ZTE did not return requests for comment. Both in the past have denied allegations their products are used to spy. The White House also did not return a request for comment.

The Wall Street Journal first reported in early May that the order was under consideration, but it was never issued.

HIT TO RURAL NETWORKS

Rural operators in the United States are among the biggest customers of Huawei and ZTE, and fear the executive order would also require them to rip out existing Chinese-made equipment without compensation. Industry officials are divided on whether the administration could legally compel operators to do that.

While the big U.S. wireless companies have cut ties with Huawei in particular, small rural carriers have relied on Huawei and ZTE switches and other equipment because they tend to be less expensive.

The company is so central to small carriers that William Levy, vice president for sales of Huawei Tech USA, is on the board of directors of the Rural Wireless Association.

The RWA represents carriers with fewer than 100,000 subscribers. It estimates that 25 percent of its members had Huawei or ZTE equipment in their networks, it said in a filing to the Federal Communications Commission earlier this month.

The RWA is concerned that an executive order could force its members to remove ZTE and Huawei equipment and also bar future purchases, said Caressa Bennet, RWA general counsel.

It would cost $800 million to $1 billion for all RWA members to replace their Huawei and ZTE equipment, Bennet said.

Separately, the FCC in April granted initial approval to a regulation that bars giving federal funding to help pay for telecommunication infrastructure to companies that purchase equipment from firms deemed as a threat to U.S. national security, which analysts have said is aimed at Huawei and ZTE.

The FCC is also considering whether to require carriers to remove and replace equipment from firms deemed a national security risk.

In March, FCC Chairman Ajit Pai said "hidden 'back doors' to our networks in routers, switches — and virtually any other type of telecommunications equipment - can provide an avenue for hostile governments to inject viruses, launch denial-of-service attacks, steal data, and more."

In the December filing, Pine Belt Communications in Alabama estimated it would cost $7 million to $13 million to replace its Chinese-made equipment, while Sagebrush in Montana said replacement would cost $57 million and take two years.

Sagebrush has noted that Huawei products are significantly cheaper. When looking for bids in 2010 for its network, it found the cost of Ericsson equipment to be nearly four times the cost of Huawei. (Reporting by Diane Bartz and David Shepardson; Additional reporting by Christian Shepherd in BEIJING; Editing by Chris Sanders, Leslie Adler & Shri Navaratnam)

Our Standards: The Thomson Reuters Trust Principles.