Jeremy Corbyn was closer than Boris Johnson to Donald Trump on some foreign and defence issues. Both the US president and the Labour leader were opposed to wars of intervention by the west, both dislike Nato and the EU, and both find it difficult to criticise Russia.

There were, of course, many other fields in which the two men differed – from Palestinian rights, to trade deals between the two countries, to relations with states like Venezuela and Iran.

All that is now immaterial and the question is how Boris Johnson’s premiership will handle diplomatic and defence issues: whether it will follow Trump poodle-like or have an independent stance on important international matters.

The post-Brexit trade deal is an imperative for a Johnson government and Trump has repeatedly said that an agreement would be done swiftly. Congratulating Mr Johnson after the election results he declared that the UK and US would now be free to strike a “massive” new deal soon.

But it will not be simple. There is the emotive and contentious issue of whether US firms will have access to the NHS. Trump maintained on his visit to the UK for the Nato leaders conference this month that the US would not want this “even if it was handed on a silver platter”.

UK front pages react to 2019 general election Show all 8 1 /8 UK front pages react to 2019 general election UK front pages react to 2019 general election The Independent compares Boris Johnson's victory to Donald Trump's in America, branding it a "post-truth" election UK front pages react to 2019 general election The Guardian focuses on Jeremy Corbyn's loss, as well as the Tory win UK front pages react to 2019 general election The Times leads with an image of the prime minister with his dog, calling his win a "landslide" UK front pages react to 2019 general election The i simply said: "Johnson unleashed" UK front pages react to 2019 general election The Daily Mail was triumphant after the Conservative win, saying the result "will finally see Brexit delivered" UK front pages react to 2019 general election The Daily Mirror called the result a "NIGHTMARE BEFORE XMAS" UK front pages react to 2019 general election Daily Star led with a picture of Labour's Diane Abbott, claiming she wore two left shoes on Thursday UK front pages react to 2019 general election The Telegraph called it a "historic victory"

But this was to help out Mr Johnson in the campaign. The US president has made contradictory statements on this. The administration’s own negotiating objectives, a public document, demands that “state-owned enterprises” should “accord non-discriminatory treatment with respect to the purchase and sale of goods and services”. It also calls for “full market access for US products” and for “government regulatory reimbursement regimes” for pharmaceuticals and medical devices.

The assertion in the summer by the US ambassador to Britain, Woody Johnson, a friend of Trump, that every aspect of the economy would be open to negotiations should not be discounted. The US bargains as hard, as any country which has carried out trade negotiations with it knows.

In any event, offering favourable terms for Mr Johnson may not be a gift for Trump to give. No one realistically expects an agreement this side of the US elections and Democrat-controlled congressional committees will have a major say on any deal.

There have been repeated warnings from senior Democrats, including house speaker Nancy Pelosi, that congress will block any deal which threatens the Northern Ireland peace process. We have yet to see whether Brexit leads to a resurgence of violence in the province.

Such is the worry in the US about Trump and Nato that the Senate foreign relations committee has voted unanimously on a bipartisan bill for a vote which would stop him from withdrawing from the alliance. Last week John Bolton, the president’s recently departed national security adviser, warned in a speech at a private corporate event that Trump could go “full isolationist” if re-elected next year.

Both Theresa May’s and Mr Johnson’s governments have stressed the UK’s commitment to Nato, and there is no indication that there is any doubt about this from other member states.

President Donald Trump jokes with then-foreign secretary Boris Johnson as Theresa May walks past during a 2017 Nato (AP)

Emmanuel Macron caused controversy last month by describing the alliance as “braindead”, partly because of the failure to address the repeated threats by Trump. One of the solutions the French president envisaged was for three member states to take the lead in trying to solve the problem: France, Germany and the UK – a stance which has peeved other members like Italy and Spain.

Mr Johnson, when it comes to the EU, is reported to have wanted to change the defence and security pledges in the Brexit deal.

The political declaration between the UK and EU contains a commitment to “close cooperation in union-led crisis management missions and operations, both civilian and military.” London, it is believed, later demanded that it must have sovereign control over how its defence assets are used.

The Tory right has long complained about EU defence initiatives, claiming it weakens Nato, and is part of a conspiracy to create a European super-state. Downing Street’s aim, however, is seen as using defence and security as leverage in the negotiations on various deals which will have to be hammered out in the future.

Theresa May had tried something similar. After triggering Article 50 a letter sent on behest of her two chiefs of staff, Nick Timothy and Fiona Hill, warned that the UK leaving without a deal would mean “in security terms a failure to reach agreement would mean our cooperation in the fight against crime and terrorism and would be weakened”.

Britain’s security and intelligence agencies have been, and remain, gravely concerned at the idea of using the issue of security as a bargaining chip. Ms May had to retreat, reassuring that the UK’s role in common defence remained unconditional.

Domestically, both Labour and the Conservatives had promised a new Strategic Defence and Security Review. There is a broad consensus for the need a for more joined up, comprehensive policy with rising new threats such as cyberwarfare, international terrorism and use of propaganda and fake news in targeting national institutions being faced.

There would also be the need to work out how the government tallies the vision of “Global Britain” with limited defence spending and the economy likely to shrink after Brexit in varying degrees, depending on terms of parting, with no deal having the most damaging effect.

One of the arguments made for leaving the EU was that it would restore Britain’s influence in the world. The Johnson government’s policy, however, will be subject to commercial constraints. Criticism of human rights abuses by regimes would be tempered with the pressing need for trade.

Mr Johnson himself would only be too aware of this. Three years ago, as foreign secretary, he accused Saudi Arabia of abusing Islam and acting as puppeteer in proxy wars. No 10 was quick to slap him down saying these “were not the government’s views” which considers the kingdom to be a “vital partner for the UK”. Mr Johnson, said Ms May’s spokesperson, would be sticking to the government line at a scheduled meeting with Saudi ministers.

Economic need has made the British government resist American pressure. The most high-profile example of this is Washington’s demand that the Chinese multinational, Huawei, is kept out of the UK’s 5G network.

The British government has postponed making a decision on this, but there is a stated policy of enlarging trade with China and a desire not to antagonise Beijing.

General election 2019: How the night unfolded

The so-called golden era in relations was initiated by David Cameron’s government; it continued under Theresa May and then Mr Johnson. The UK is one of the very few western countries involved in China’s highly controversial “belt and road” scheme which has been widely accused of being a vehicle for expanding Chinese hegemony.

There are none such obvious financial factors in differences between the US and UK in dealing with another state, Iran.

The Trump administration has been demanding that the UK joins it in pulling out of the deal between international powers and Iran over its nuclear programme, and join in imposing punitive sanctions on Tehran.

Britain has, so far, resisted this and is indeed, along with France and Germany, engaged in establishing the Instex scheme, which enables companies to trade with Iran avoiding American sanctions.

The Netherlands, Denmark, Finland, Norway and Sweden have defied the US to join Instex. Whether Britain sticks to its policies or caves in to Washington will be a barometer of the Johnson government’s relationship with the Trump administration.