Badenoch used Wednesday’s Prime Minister’s Questions – the first since the first set of Mandelson documents were published – to repeatedly press Sir Keir on his actions ahead of the appointment.

“The prime minister tried to avoid scrutiny on the Mandelson files by releasing the documents immediately after Prime Minister’s Questions last week,” she said.

“So let me ask him now, did the prime minister personally speak to Peter Mandelson about his relationship with the convicted paedophile Jeffrey Epstein before appointing him as our ambassador to Washington?”

In reply, Sir Keir said: “This was my mistake in making the appointment, and I’ve apologised to the victims of Epstein, I do so again.

“The matter of process was looked at by the independent adviser on ministerial standards. It’s clear the appointment process wasn’t strong enough, and that’s why I’ve already strengthened it.

“But it was my mistake, and I’ve apologised for it. She should follow suit and apologise for her gross error of judgement in calling for the UK to join the war in Iran without thinking through the consequences.”

Badenoch replied: “He is right, it is about his judgement.

“He has repeatedly told us that Peter Mandelson lied to him, but he won’t tell us if he actually picked up the phone and spoke to Mandelson before appointing him.

“If the prime minister didn’t speak to him, how can he say he lied to him?”

The prime minister repeated his previous argument that the process had been examined by his ethics adviser before moving on to criticise the Conservative shadow justice secretary Nick Timothy, for describing Muslims – including London Mayor Sadiq Khan – praying in Trafalgar Square as “an act of domination”.

Sir Keir said Timothy should be sacked for his “appalling” comments.

Badenoch said her shadow justice secretary was “defending British values” and accused the prime minister of trying to avoid the question.

Asked about the Mandelson appointment following Prime Minister’s Questions, a No 10 spokesman said: “The full process at the time of the appointment was followed, there was no requirement for a formal interview with the prime minister as part of that process.”