Boris Johnson has been accused of "trying to be like" Donald Trump and modelling himself on the US president as major parties clashed in the latest televised election debate.

The prime minister was absent from the seven-way contest hosted by ITV on Sunday evening, sending minister Rishi Sunak in his place instead to defend the government's record on issues like Brexit, the NHS, and austerity.

Mr Trump is due to visit Britain on Tuesday, where he will dine with Mr Johnson and other world leaders at a banquet – a trip that is likely to dominate the headlines at a crucial point in the election campaign.

The president has previously feted Mr Johnson with praise and said he is "doing very well". But this week the prime minister is reportedly trying to minimise his screen time with the US president because of the sensitive timing of the visit.

The Tory leader's close relationship with the US president was defended by Nigel Farage, who also downplayed Mr Trump's history of making lewd comments about women.

Mr Farage has said it was a "great mistake" for politicians in Britain to demonise the US president because of the great advantages a close relationship would bring.

"It was crass and it was crude and it was wrong - men say dreadful things sometimes," he said, referring comments in which the US president said he would "grab" women by their genitals without their permission.

But Mr Farage added: "If all of us were called out for what we did on a night out after a drink, none of us would..."

Amid consternation from the studio audience and other leaders Mr Farage was then interrupted by Liberal Democrat leader Jo Swinson who said: "Is that what you do on a night out after a drink?"

Mr Farage replied: "He is president of the USA and that relationship matters. You are so anti-American you are prepared to put your hatred of Trump above our national interest That is a great mistake."

Scotland's First Minister Nicola Sturgeon said: "That in my view is not what the UK or any part of it needs. Donald Trump's attitudes are wrong and they are dangerous. In Boris Johnson, we have got somebody who is trying to be like him."

Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Show all 30 1 /30 Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Members of the Proud Boys, a fascist group, jeer at anti-Trump protesters outside of the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter dressed as Uncle Sam poses at Uncle Sam Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A baby blimp rears its head amidst a group of anti-Trump protesters outside the president't campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam President Trump addresses supporters at the launch event of his 2020 election campaign in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Proud Boys have adopted Fred Perry polo shirts as their uniform and many members have the name of the group tattooed on their arms Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A line of police officers separate opposing groups of protesters outside the launch of President Trump's 2020 campaign launch Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A protester hits a Trump punching bag during a protest outside Trump's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Twin Trump supporters pose for a photo at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A protester dressed as a caricature of Donald Trump stands outside the president's 2020 campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Trump supporter faces off against a protester outside the president's campaign launch in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Proud Boy shouts across the police line at anti-Trump protesters outside the president's campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Trump supporter poses for a photo at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Proud Boy jeers at anti-Trump protesters who are separated from the president's supporters by a police line outside the president's campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A man dressed as Uncle Sam poses at President Trump's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam An anti-Trump protester faces off against a supporter outside the president's campaign launch in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Members of the Proud Boys, a fascist group, jeer at anti-Trump protesters outside of the president's 2020 campaign launch Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A child holds a 2020 US "dollar bill" that features Donald Trump's face at the president's 2020 campaign launch EPA Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Anti-Trump protesters rally outside the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Anti-Trump protesters rally outside the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Numerous baby Trump balloons are raised in protests outside of the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter wears a T-shirt depicting Trump as a hero at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam President Trump addresses supporters at the launch event of his 2020 election campaign in the Amway Centre in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam An anti-Trump protester calls for the president to be impeached outside the launch event for his 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Supporters of Donald Trump face off against protesters outside of the president's 2020 campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A baby blimp rises behind a group of anti-Trump protesters outside the president's campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter dressed as Uncle Sam poses at President Trump's 2020 campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A member of the Proud Boys, a fascist group, holds a sign up outside of the president's 2020 campaign launch in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter bears a Trump flag at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Protesters hold baby Trump balloons in the rally outside of the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam An anti-Trump protester holds a sign accusing the president of being a traitor Getty

Labour's shadow justice secretary Richard Burgon, who was representing his party in the debate said: "Our quarrel and difference is with some of the policies of Donald Trump, who like Boris Johnson is a politician who has given the green light to sexism, homophobia and racism - and that cannot be allowed to flourish."