COPENHAGEN- Danish lawmakers have passed legislation to allow the screening of future foreign investments to ensure they don't pose a threat to national security, the business ministry said on Wednesday.

The new legislation was developed in part following security concerns over a bid by China's Huawei to build Denmark's 5G network. Denmark's biggest telecoms operator, TDC, eventually picked Ericsson over Huawei for the job.

Screening under the new law, which does not mention China, will be carried out for investments into defence, information technology and critical infrastructure.

"The purpose of this Act is to prevent that outside foreign direct investment and special economic agreements may pose a threat to national security or public order in Denmark, through screening and potential interference with such investments and agreements," the legislation said.

"Foreign investors would be assessed on their potential link to foreign governments, armed forces or other state entities as well as any connection to criminal activities," it said.

Following concerns over the development of the 5G network, Defence Minister Trine Bramsen last year said Denmark wanted to be able to exclude 5G technology suppliers from providing critical infrastructure if they are not from countries considered security allies. rn:newsml:reuters.com:*:nL8N2DL3ER

The law does not apply to Greenland or the Faroe Islands, which are sovereign territories under the Kingdom of Denmark.

In 2019, EU lawmakers backed a far-reaching system to coordinate scrutiny of foreign investments, notably from China, to protect strategic technologies and infrastructure in Europe.

(Reporting by Jacob Gronholt-Pedersen and Nikolaj Skydsgaard. Editing by Mark Potter) ((copenhagen.newsroom@thomsonreuters.com; +45 3274 2001; Reuters Messaging: jacob.pedersen.thomsonreuters.com@reuters.net))