The US has warned Boris Johnson that his hopes of a post-Brexit trade deal rest on first making progress in the already-troubled negotiations with the EU.

Speaking in London, Steven Mnuchin, the US Treasury secretary, insisted he was “optimistic” that the agreement most prized by Brexiteers can be struck by the end of the year.

But he also made clear there were “certain issues” the UK would “need to resolve with the EU”, before Washington could sign up its own deal designed to boost transatlantic trade.

Mr Mnuchin – who clashed with Sajid Javid, the chancellor, in Davos over the UK’s planned digital services tax – also insisted Donald Trump’s administration would not back down in that row.

The two countries are on a collision course after Mr Javid vowed to press ahead with the 2 per cent levy on Google, Facebook and other tech giants, despite the threat of retaliatory US taxes on UK car exports.

“The US feels very strongly that any tax that is designed specifically on digital companies is a discriminatory tax and is not appropriate,” Mr Mnuchin told a Chatham House event in London.

The possible trade war looms as Downing Street seeks a fast-track deal to lower tariffs and other trade barriers with the US – a task the prime minister has insisted will begin immediately after Brexit Day on Friday.

Doubts had already been raised over US willingness to agree a deal without knowing the terms of trade between London and Brussels, which Mr Mnuchin appeared to underline.

Nevertheless, on the potential for a deal, he said: “I’m quite optimistic. We’re focused on trying to get this done this year because we think it’s important to both of us.”

Bizarre: Boris Johnson drives 'Brexit' digger through boxes Show all 8 1 /8 Bizarre: Boris Johnson drives 'Brexit' digger through boxes Bizarre: Boris Johnson drives 'Brexit' digger through boxes Conservative party leader Boris Johnson drives a JCB through a fake wall POOL/AFP via Getty Images Bizarre: Boris Johnson drives 'Brexit' digger through boxes Prime Minister Boris Johnson during a visit to JCB cab manufacturing centre in Uttoxeter, while on the General Election campaign trail. PA Photo. Picture date: Tuesday December 10, 2019. See PA story POLITICS Election. Photo credit should read: Stefan Rousseau/PA Wire Stefan Rousseau PA Bizarre: Boris Johnson drives 'Brexit' digger through boxes Britain's Prime Minister and Conservative party leader Boris Johnson drives a Union flag-themed JCB, with the words "Get Brexit Done" inside the digger bucket, through a fake wall emblazoned with the word "GRIDLOCK", during a general election campaign event at JCB construction company in Uttoxeter, Staffordshire, on December 10, 2019. - Britain will go to the polls on December 12, 2019 to vote in a pre-Christmas general election. (Photo by Ben STANSALL / POOL / AFP) (Photo by BEN STANSALL/POOL/AFP via Getty Images) BEN STANSALL AFP via Getty Bizarre: Boris Johnson drives 'Brexit' digger through boxes Prime Minister Boris Johnson sits in a cab of a JCB during a visit to its cab manufacturing centre in Uttoxeter, while on the General Election campaign trail. PA Photo. Picture date: Tuesday December 10, 2019. See PA story POLITICS Election. Photo credit should read: Stefan Rousseau/PA Wire Stefan Rousseau PA Bizarre: Boris Johnson drives 'Brexit' digger through boxes Britain's Prime Minister and Conservative leader Boris Johnson drives a Union flag-themed JCB, with the words "Get Brexit Done" inside the digger bucket, through a fake wall emblazoned with the word "GRIDLOCK", during a general election campaign event at JCB construction company in Uttoxeter, Britain, December 10, 2019. Ben Stansall/AFP/Pool via REUTERS POOL REUTERS Bizarre: Boris Johnson drives 'Brexit' digger through boxes A sign made for a visit by Prime Minister Boris Johnson to the JCB cab manufacturing centre in Uttoxeter, while on the General Election campaign trail. PA Photo. Picture date: Tuesday December 10, 2019. See PA story POLITICS Election. Photo credit should read: Stefan Rousseau/PA Wire Stefan Rousseau PA Bizarre: Boris Johnson drives 'Brexit' digger through boxes Britain's Prime Minister and Conservative party leader Boris Johnson drives a Union flag-themed JCB, with the words "Get Brexit Done" inside the digger bucket, through a fake wall emblazoned with the word "GRIDLOCK", during a general election campaign event at JCB construction company in Uttoxeter, Staffordshire, on December 10, 2019. - Britain will go to the polls on December 12, 2019 to vote in a pre-Christmas general election. (Photo by Ben STANSALL / POOL / AFP) (Photo by BEN STANSALL/POOL/AFP via Getty Images) BEN STANSALL AFP via Getty Bizarre: Boris Johnson drives 'Brexit' digger through boxes Britain's Prime Minister and Conservative party leader Boris Johnson reacts as he sits in the cab of a drives a Union flag-themed JCB, after driving through a fake wall emblazoned with the word "GRIDLOCK", during a general election campaign event at JCB construction company in Uttoxeter, Staffordshire, on December 10, 2019. - Britain will go to the polls on December 12, 2019 to vote in a pre-Christmas general election. (Photo by Ben STANSALL / POOL / AFP) (Photo by BEN STANSALL/POOL/AFP via Getty Images) BEN STANSALL AFP via Getty

And he added: “I think a lot of the issues can be dealt with simultaneously and again we look forward to continuing a great trade relationship, and if anything I think there will be significantly more trade between the US and the UK.”

The UK-EU talks are already at risk of breaking down over Mr Johnson’s vow of “no alignment” with EU regulations and Brussels’ insistence that an agreement on fishing rights must come first.

It leaves the UK at risk of an effective no-deal Brexit – without a trade deal – at the end of 2020, forcing it onto far-inferior World Trade Organisation (WTO) rules.

Hopes of a quick-fire US deal also appear slim if Mr Johnson sticks to his red lines of not allowing in chlorinated chicken and hormone-pumped beef, or to open up the NHS to US drug giants.

At the event, Mr Mnuchin declined to expand on a further controversy – Washington’s plea for the UK to shut out the Chinese firm Huawei from its 5G network.

Mr Johnson is expected to defy the US, convinced Huawei can build the “non-core” network without a security risk, with a long-delayed decision due from the National Security Council within days.