US President Donald Trump urged Britain to be “very careful” about involving Chinese tech giant Huawei in its new 5G network, in an interview published Saturday ahead of his state visit to London.

Asked about reports that Britain is planning to give the firm a limited role, Trump told the Sunday Times newspaper: “Well, you have other alternatives and we have to be very careful from the standpoint of national security.”

He added: “You know we have a very important intelligence gathering group, that we work very closely with your country (Britain) and so you have to be very careful.”

The US has long voiced suspicions that Huawei is controlled by the Chinese government and thus a global security threat — charges strongly denied by the firm and by Beijing.

Prime Minister Theresa May’s government has insisted a decision has not yet been made on Huawei’s involvement in building a 5G network in Britain.

Trump said he believed “things will all work out, you’ll see”.

In a wide-ranging interview, the president also repeated previous criticism of May’s strategy for taking Britain out of the European Union.

She is due to step down in the coming weeks over her failure to deliver Brexit on time.

Trump suggested her as-yet unchosen successor should walk away from Brexit talks with the bloc if they do not get a better deal.

“I would walk away. If you don’t get the deal you want if you don’t get a fair deal, then you walk away,” he said.

The day after endorsing former foreign minister Boris Johnson to succeed May, Trump suggested another leading Brexit supporter, Nigel Farage, should help negotiate with Brussels.

He said that Farage, whose Brexit party caused a major upset in recent European elections, “has a lot to offer”.

“They won’t bring him in. Think how well they would do if they did,” he said.

Trump will be welcomed to London on Monday by Queen Elizabeth II at the start of a three-day state visit that will also include talks with May and a ceremony marking 75 years since the D-day landings.