Boris Johnson mostly avoided talking about Brexit during his rambling inaugural address to the UN General Assembly on the topic of AI.

Speaking in a late slot on Tuesday to a sparsely populated hall, Mr Johnson discussed the potential perils of new technological advances while hailing London as having "the biggest tech [industry] anywhere in Europe".

The speech came on a day when the Supreme Court ruled that his decision to prorogue Parliament was unlawful, making the address his last commitment before cutting his trip to New York short and returning early to the UK.

The prime minister littered his speech with jokes about futuristic "hangover cures", the threat of "pink-eyed Terminators", "terrifying limbless chickens" and household devices that "monitor your nightmares, monitor your fridge".

But he did manage to squeeze in one dig at his own country's MPs, accusing them of wanting the Brexit process to go on forever.

He made the comment during a discussion of the classical myth of Prometheus, a Titan condemned by Zeus to eternal torture.

"It is a trope as old as literature that any scientific advance is punished by the gods," he said. "When Prometheus brought fire to mankind in a tube of fennel… Zeus punished him by chaining him to a Tartarian crag while his liver was pecked out by an eagle.

"And this went on forever. A bit like the experience of Brexit in the UK, if some of our Parliamentarians had their way."

The joke, as well as this and other classical references during Mr Johnson's speech, drew a few laughs but largely appeared to fall flat in the nearly deserted hall. The Press Association reported that London's UN ambassador Karen Pierce, at least, laughed along.

On AI, Mr Johnson said: "Above all, we need to agree a common set of global principles to shape the norms and standards that will guide the development of emerging technology."

He also extended an invitation to those gathered in the room.

"So - here's the good news - I invite you next year to a summit in London," he said, before praising the city for having "perhaps half a million people working in tech alone".

Supreme Court verdict: Boris Johnson prorogation unlawful Show all 16 1 /16 Supreme Court verdict: Boris Johnson prorogation unlawful Supreme Court verdict: Boris Johnson prorogation unlawful The Supreme Court has ruled against Boris Johnson by declaring his government unlawfully shut down parliament for five weeks EPA Supreme Court verdict: Boris Johnson prorogation unlawful Lady Hale handed down the historic verdict, hailed by opposition MPs and anti-Brexit campaigners. She said all 11 judges were unanimous in deciding that the case is “justiciable”, so the government loses that part of the argument. “The court is bound to conclude therefore that the decision to advise Her Majesty to prorogue was unlawful because it had the effect of frustrating or preventing the ability of Parliament to carry out its constitutional functions.” EPA/Supreme Court Supreme Court verdict: Boris Johnson prorogation unlawful Gina Miller and her team react outside the Supreme Court are the verdict. She said: “Today is not a win for any individual or cause. It is a win for Parliamentary sovereignty, the separation of powers and independence of our British courts. Crucially, today’s ruling confirms that we are a nation governed by the rule of law, laws that everyone, even the Prime Minister, are subject to." PA Supreme Court verdict: Boris Johnson prorogation unlawful A person dressed as a caricature of British Prime Minister Boris Johnson in a prison uniform stands outside the Supreme Court AP Supreme Court verdict: Boris Johnson prorogation unlawful Labour leader Jeremy Corbyn called for Mr Johnson to “consider his position” following the landmark decision, while Lib Dem leader Jo Swinson said he was “not fit to be prime minister” Getty Supreme Court verdict: Boris Johnson prorogation unlawful Scottish National Party (SNP) Westminster leader Ian Blackford raises his arms as he comes outside. He said: "This is an absolutely stunning judgement by the Supreme Court today." He went on to say, "we all want to get back to work, and quite frankly, on the back of this, Boris Johnson must resign immediately." AFP/Getty Supreme Court verdict: Boris Johnson prorogation unlawful Crowds outside celebrated the verdict AP Supreme Court verdict: Boris Johnson prorogation unlawful Delegates at the Labour party conference applaud after hearing the news AFP/Getty Supreme Court verdict: Boris Johnson prorogation unlawful Speaker John Bercow said MPs must now “convene without delay” and confirmed the Commons would return at 11.30am on Wednesday AFP/Getty Supreme Court verdict: Boris Johnson prorogation unlawful Gina Miller said: "“As a result of this judgment, Parliament is open, it was never prorogued. I urge MPs to get back to work immediately.” AP Supreme Court verdict: Boris Johnson prorogation unlawful MPs Anna Soubry, Liz Saville Roberts and Caroline Lucas, together with SNP leader Ian Blackford, react. Green MP Caroline Lucas has said the Supreme Court’s decision is “just the start” Reuters Supreme Court verdict: Boris Johnson prorogation unlawful “The UK deserves a Prime Minister and a Government who act with honesty, integrity and in a manner consistent with our constitution, at all times." AFP/Getty Supreme Court verdict: Boris Johnson prorogation unlawful Anti-Brexit supporters react as they gather outside the Supreme Court in London, Tuesday, Sept. 24, 2019 as it makes it's decision on the legality of Prime Minister Boris Johnson's five-week suspension of Parliament. (AP Photo/Frank Augstein) Frank Augstein AP Supreme Court verdict: Boris Johnson prorogation unlawful The SNP’s Joanna Cherry QC says: “Boris Johnson’s position is untenable and he should have the guts to resign.” PA Supreme Court verdict: Boris Johnson prorogation unlawful epa07865617 Protesters react outside the Supreme Court after the result of a hearing on the prorogation of parliament, in London, Britain, 19 September 2019. The Supreme Court ruled that the suspension of parliament by British Prime Minister Boris Johnson was not lawful. EPA/NEIL HALL NEIL HALL EPA Supreme Court verdict: Boris Johnson prorogation unlawful Tom Tugendhat MP returned to the chamber in the House of Commons within minutes of the Supreme Court ruling PA

"I hope you will come there, where we will seek to assemble the broadest possible coalition to take forward this vital task."

It was not clear if Mr Johnson was referring to London Tech Week, which began in 2014 and takes place each June, or a new event. Neither Downing Street nor the Department for Digital, Culture, Media & Sport were able to provide clarification.