The European Union is said to have leapfrogged Britain in the queue to strike a post-Brexit free-trade deal with the US.

US President Donald Trump campaigned on a platform of opposing the Transatlantic Trade Investment Partnership (TTIP), but is believed to have opened up to the idea of an EU deal three months into his first term.

The change of heart is said to have taken place during his talks with German Chancellor Angela Merkel when Trump realised a US-EU deal would be simpler than negotiating with individual EU countries, which is not permitted under EU laws, and Britain.

Britain cannot enter into new trade deals until it has officially left the EU in May 2019, but officials are keen to negotiate the terms of new agreements in advance.

"Ten times Trump asked her [Merkel] if he could negotiate a trade deal with Germany," an unnamed German politician told the Times. "Every time she replied, 'You can't do a trade deal with Germany, only the EU.'

"On the 11th refusal, Trump finally got the message, 'Oh, we'll do a deal with Europe then.'"

White House officials also confirmed Trump's change of priorities to the Times.

The revelation is set to embarrass Prime Minister Theresa May and Foreign Secretary Boris Johnson who promised that a trade deal with the US will negate any loss of business from the EU following Brexit.

During a trip to America in January, Johnson declared Britain will be "first in line" to strike a deal with the US.

However, a trade deal with Europe is far more lucrative for the US than a deal with Britain.

US exports to the EU were worth $270bn (£211bn) last year and it imported $417bn in goods from the bloc, according to figures quoted in the Times. Whereas the US exported $55bn from Britain and imported $54bn.

Prior to Britain's EU referendum, former US President Barack Obama warned British voters that leaving the bloc would put the country at the "back of the queue" in terms of a trade deal.

"[Brexit campaigners] are voicing an opinion about what the United States is going to do, I figured you might want to hear from the president of the United States what I think the United States is going to do," Obama said on 22 April, 2016.

"And on that matter, for example, I think it's fair to say that maybe some point down the line there might be a UK-US trade agreement, but it's not going to happen any time soon because our focus is in negotiating with a big bloc, the European Union, to get a trade agreement done."

However, his comments were attacked as an improper interference in British politics and Britain voted to leave the EU two months later.