He wrote: “I consider that the documentation that has been made public indicates that the relevant process for a political appointee was followed.”

Conservative shadow chancellor of the Duchy of Lancaster Alex Burghart had asked Sir Laurie, who is the independent adviser on ministerial standards, to look into a “possible breach of the Ministerial Code” by the prime minister.

The documents released earlier this week showed Sir Keir had been warned Lord Mandelson’s relationship with the paedophile Jeffrey Epstein posed a “reputational risk” before he was confirmed as US ambassador.

They also included advice sent to the prime minister which said the pair’s relationship continued after Epstein’s conviction for procuring sex from a minor in 2008.

Sir Keir has since said he “made a mistake” in giving the role to Lord Mandelson and apologised to Epstein’s victims.

The Conservatives claimed there was a “cover-up” in the release because two sections reserved for comments from Sir Keir about the appointment were blank, raising suspicions that they had been redacted.

It is understood no redactions were made to these sections and that they were published in the form they had been returned from the prime minister’s office, after he had reviewed them.