Palantir, founded by tech billionaire Peter Thiel, a prominent donor to US President Donald Trump, already holds contracts with other UK public sector bodies.

City Hall has raised concerns about value for money. It is also understood Sir Sadiq intends to speak to the government about whether a company’s ethics should be taken into account during procurement.

Mosley told Times Radio, external: “Not allowing the Metropolitan Police to have this software will give hostile states and criminals an advantage. It’ll mean they cannot put more officers on the front line.

“I think the mayor is putting politics over public safety. He talks about values, but I think what Londoners value is not being mugged, not being raped by a serving police officer.”

The Business Secretary Peter Kyle, speaking on the same programme, said Sir Sadiq needed to “set out the reasons” for his decision.

He said: “We need to have more British AI companies that can do those kinds of things, which is why I’ve taken equity stakes in British AI firms and British tech firms, so that we can scale them up much, much faster.”