Donald Trump’s state visit to the UK is deemed by American officials to have gone far better than many had feared. So much so that one official pointed out there was more concern now about what the president may tweet next about tariffs on Mexico – with a confrontation looming with congress on the issue – than what he had done here.

Even the weather had remained clement for the D-Day commemoration so there was no risk of the embarrassment of last November when Mr Trump travelled to France, but failed to turn up for a ceremony to honour the American fallen in the First World War because it was raining.

Mr Trump’s claim that thousands had been on the streets of Britain cheering him with just a handful protesting against the visit, when the exact reverse was true, was not, it was felt, a major issue. This was a president, after all, who had hugely inflated crowd numbers on his inauguration day, and is prone to other wild exaggerations, without adversely affecting the view of his supporters and ceasing to be a matter of surprise for the wider American public.

The scenes of the protests were shown on American networks, but the negative impact of that is believed to have been outweighed by the widespread coverage of Mr Trump and his relatives with the Queen and her family, with so many Americans fascinated by the royals.

Nothing concrete was achieved in the visit. But then there was no expectation of much else, with Theresa May due to go just days after the president departs and cabinet ministers unlikely to stay in their departments in the future with a new prime minister coming in and, possibly, an election in the offing.

20 pictures that sum up President Trump's visit Show all 20 1 /20 20 pictures that sum up President Trump's visit 20 pictures that sum up President Trump's visit An awkward greeting As the Queen welcomed Trump to Buckingham Palace, he shared an awkward handshake with her. PA 20 pictures that sum up President Trump's visit "Oi Trump" Essex teenager Ollie Nancarrow mowed this message to Trump in a field near Stansted airport, in order that the president would be forced to see it as he came in to land. BornEco 20 pictures that sum up President Trump's visit A warm welcome Protesters gesture at the helicopter carrying the president as he arrives at Buckingham Palace on the first day of his visit. Getty 20 pictures that sum up President Trump's visit Inspecting the guard After arriving at Buckingham Palace, President Trump inspected an honour guard with Prince Charles. AP 20 pictures that sum up President Trump's visit Khan hits back After the president insulted Sadiq Khan, the London mayor, over Twitter as he landed in Britain, Khan hit back in this video released by Elle. PA 20 pictures that sum up President Trump's visit Mild reception on the Mall The Mall, the road leading to Buckingham Palace, was lacking in pomp as Trump arrived after his visit to Westminster Abbey, only a very small crowd turned out to see the spectacle. Reuters 20 pictures that sum up President Trump's visit Toast with the Queen The president shared a toast with the Queen at the state banquet on his first night in Britain. Reuters 20 pictures that sum up President Trump's visit Creepy kids This picture of Ivanka Trump and husband Jared Kushner, shared to Ivanka's Instagram, was described variously as "terrifying", like "nightmares" and "scarier than the shining." Getty 20 pictures that sum up President Trump's visit Rolling out the red carpet A red carpet was rolled out for the president's arrival to 10 Downing Street. Reuters 20 pictures that sum up President Trump's visit Meeting with May President Trump met with Prime Minister Theresa May on the second day of his visit. They did not speak privately but in a boardroom meeting. Reuters 20 pictures that sum up President Trump's visit Spouses get along First Lady Melania Trump and husband of the prime minister Philip May attended a garden party for the families of Downing Street staff while the two leaders were in their meeting. Getty 20 pictures that sum up President Trump's visit Baby blimp flies again The famous Trump baby blimp made a return in the protests against the president's visit, after first appearing in July last year. EPA 20 pictures that sum up President Trump's visit Crowd gathers A large crowd of protesters gathered in Trafalgar Square in London to protest the president's visit. Notable protesters included a man selling Donald Trump toilet paper and a man dressed as Vladimir Putin controlling a Trump puppet. PA 20 pictures that sum up President Trump's visit Protesters mix and mingle Supporters of the president and protesters of his visit clashed by Parliament Square on the second day of Trump's visit, with some supporters being hit by milkshakes. Reuters 20 pictures that sum up President Trump's visit Toilet Trump A 20ft statue of Trump tweeting while sitting on a golden toilet was placed in Trafalgar Square as protesters gather on the second day of the president's visit. Tom Batchelor / The Independent 20 pictures that sum up President Trump's visit Corbyn speaks In an address to protesters, Labour leader Jeremy Corbyn accused the president of spreading "hatred" and "racism" and expressed disappointment that Sadiq Khan had "been attacked in the way he was." PA 20 pictures that sum up President Trump's visit Churchill hat During his interview with the president on Good Morning Britain, Piers Morgan gave Trump a hat of a style favoured by Winston Churchill, one of Trump's heroes. ITV 20 pictures that sum up President Trump's visit Bus stop baby Activists Special Patrol Group installed this poster in to several bus stops around Portsmouth ahead of the president's arrival for D-Day commemorations PA 20 pictures that sum up President Trump's visit Fly-past with the queen President Trump watched the Red Arrows fly-past with the Queen at an event in Portsmouth to commemorate the 75th anniversary of the D-Day landings AFP/Getty 20 pictures that sum up President Trump's visit Commemoration speech The president gave a speech at an event to commemorate the 75th anniversary of the D-Day landings. Along with Trump, the prime minister and the royal family, French president Emmanuel Macron and 300 Second World War veterans were in attendance. AFP/Getty

Nothing much can be read into Mr Trump’s statements on matters such as intelligence sharing if the Chinese technology multinational, Huawei, is let into the UK telecommunications network or whether the NHS is on the table in a future trade deal. The US president contradicted himself in what he said on both these issues in a short space of time and his position may well change yet again.

The US is expected to continue applying pressure over Huawei. Mike Pompeo, the secretary of state, has been on tour of European countries, lobbying for the Chinese company to be kept out of their networks, and it is highly unlikely, say officials, that the UK would be given a free pass on this by Washington.

The European states did not acquiesce immediately to American demands. But they have already expressed more reservations about Huawei than Britain and are likely to bring in some form of restrictions.

The UK’s need for a post-Brexit trade deal with the US will make it more susceptible, it is suggested, to what the Trump administration wants. And a quick deal, both governments agreed in London, was a welcome common objective.

Indeed, Mr Trump has promised a “phenomenal deal”. But just how likely is that? Most trade deals take years of negotiations and the extent of one with the US will depend on the terms finally agreed with the European Union on Brexit, something which continues to remain unclear.

The EU is Britain’s largest economic partner, accounting for 49.4 per cent of its trade. The US comes second, but with a significant drop to 14.7 per cent of total trade in goods and services.

Leaving the EU without a deal would allow the UK to negotiate its own trade deals without constraints. But there is little doubt that the big economies, not just the US, but others like China and India, would come with tough negotiating terms – what with the UK desperate for business.

There has been no evidence that Mr Trump’s “America First” policy would be waived for Britain, and Washington is likely to seek concessions on matters such as the EU’s safety and environmental standards.

This would create major problems between Britain and its largest trading partner and also make a hard border between Ireland and Northern Ireland a real possibility, endangering the Good Friday Agreement, which brought to an end 30 years of conflict.

This would have huge repercussions in US congress where approval would be needed on a trade deal. Nancy Pelosi, the senior Democrat in the House of Representatives, had stated there could be no trade deal with the UK if the Good Friday Agreement is threatened.

Others had taken a similar stance. Chris Murphy, a Democrat member of the Senate committees on foreign affairs and on oversight and government reform, held that congress is not going to pass a trade deal in the event of a hard Brexit, which would inevitably “blow up” the Northern Ireland peace process.

Fox News tries to claim that protesters aren't booing Ivanka Trump outside of Downing Street

Just time-wise, he pointed out, an agreement is almost certain to come after the next US election when Mr Trump may not be in power and a Democrat president may be in the White House, maintained Mr Murphy. He and others have been advising all the contenders for the Democrat nomination for the 2020 presidential election of the need to put an EU deal first, if they win.

Mr Murphy also pointed out the determination of the Irish American lobby to preserve the Good Friday Agreement. “The lobby, of which I am a member, is pretty powerful in the US. Unless there is certainty about how you’re going to put off a hard border,” he wanted to stress, “there isn’t going to be a lot of interest in congress in the US getting into a trade deal with Britain.

“The head of the Committee on Overseas Trade in the House is Richie Neill, who is the most prominent member of the Irish American caucus, and he [will] be asking lots of questions, you can be sure, about the peace process before anything happens.”

Mr Trump flew out of Britain on Wednesday afternoon for Ireland where he will meet Leo Varadkar. The president will once again raise the topic of Huawei, according to Irish and American officials, and Brexit is due to be discussed with the taoiseach pointing out that his country and the EU will remain united on the issue of the hard border.