The letter, marked “official – sensitive”, was shared with Jeremy Heywood, the then-cabinet secretary, John Manzoni, the then-permanent secretary at the Cabinet Office, Kim Darroch, then-British ambassador to the US, the HR directors at the foreign office and cabinet office, and Simon McDonald, now Lord McDonald, who was then-head of the foreign office.

Lord McDonald made a highly unusual intervention this week, saying he had tried to get in touch with No10 about the possibility of Dame Antonia being appointed and warning “more due diligence” was needed.

“The due diligence needs to be thorough. If the candidate mentioned in the media is the one, in my view, the due diligence has some way still to go,” he told Channel 4 News.

Others in government defended Dame Antonia vociferously, accusing Lord McDonald of a “disgusting” and “hugely irresponsible” attack on her.

One official who has worked with her recently described her as “the most inspiring leader in the civil service”.

“There are people right from the very top to the most junior staff who are outraged and completely baffled. Not only that it’s an attack on a civil servant who can’t defend themselves, but also that it is not remotely true.

“People follow her and want to work with her.”

Another official who spoke to the BBC stressed that in the nine years since the investigation, the civil servant had led three government departments with a combined staff of around 150,000 people and not received a single complaint.

Sir Matthew Rycroft, who was UK Permanent Representative to the UN at the time Romeo was in New York in 2017, said: “The decision maker was the CEO of the Civil Service. He concluded that there was no case to answer, and he reported this to the Cabinet Secretary who agreed.

“I was the senior FCDO official in New York at the time, and having seen the relevant documentation myself, I can confirm that I too was satisfied there was no case to answer in relation to the single formal complaint that was made.”

Rupert McNeil, the head of HR for the British Government at the time, said: “As the head of the Civil Service Human Resources function at the time, I can confirm the investigation into the one formal complaint against Antonia nine years ago was done thoroughly and independently – and it concluded there was no case to answer.

“The smears being thrown against her are reprehensible and hypocritical. They undermine every investigation that the civil service has run.

“Former officials making these entirely inappropriate remarks were actively part of the governance of civil service processes and so it is astonishing that they feel they can make comments now which they never made to me at the time.

“She is an excellent public servant who has served governments of all stripes with diligence and respect.”

A Cabinet Office spokesperson said: ⁠”As we have repeatedly made clear, one formal complaint was raised nine years ago and the allegations were dismissed on the basis that there was no case to answer. This letter confirms that is the case.

“Antonia Romeo is an outstanding leader with a 25-year record of excellent public service.”