Less than a year ago, Sir Mark Sedwill welcomed a smiling Boris Johnson to Downing Street after he became prime minister.
Now, it is Sir Mark’s turn to signal his exit from No 10.
Perhaps more so than any of his recent predecessors, he aptly fits the historical description of cabinet secretary as being one of the most powerful people in the country the public have never heard of.
The 55-year old career diplomat may not have had the big personality of some of those who proceeded him in the role, such as Robert Armstrong, Robin Butler and Gus O’Donnell.
But he was arguably as powerful and influential as any of them.
He advised Boris Johnson, and before him Theresa May, during the eye of the Brexit storm and throughout a turbulent twelve-month period in which neither prime minister had a majority in Parliament.
He was centre stage, albeit almost invariably behind the scenes, in some of the most controversial decisions of the past 18 months, including Boris Johnson’s unlawful suspension of Parliament and the snap general election.
And, unlike his predecessors, he also had unprecedented input when it came to decisions on national security, acting simultaneously as the PM’s national security adviser.
Sir Mark took over as cabinet secretary in November 2018, following the death from cancer of Sir Jeremy Heyward – having filled in for him previously while he was receiving treatment.
Appointed without a formal recruitment process by Theresa May, he won the ex-PM’s trust while serving as her top civil servant in the Home Office for four years.
Prior to that, he worked in the Foreign Office for more than twenty years, latterly as Ambassador to Afghanistan and as Nato’s senior civilian representative in that war-torn country.
While advising Mrs May, he led a high-profile investigation into alleged leaks of information from the National Security Council over the Chinese technology firm Huawei, which led to the resignation of the then defence secretary Gavin Williamson.
This made him some powerful enemies on the Conservative benches, particularly among Leave supporters – some of whom blamed the civil service for frustrating the government’s strategy on Brexit.
While rarely venturing into public controversy, Sir Mark was quick to make his feelings known when he believed the neutrality and independence of the civil service was being impugned.
He came to the defence of Sir Kim Darroch after he was effectively forced out as US Ambassador last year, describing leaks leading to his marginalisation by Donald Trump as a “shocking betrayal of trust”.
And appearing before MPs earlier this year, he described Philip Rutnam’s controversial resignation from the Home Office, amid a row over alleged bullying by the home secretary Priti Patel, as “regrettable”.
Along with other leading figures in Whitehall, Sir Mark – who is married with one daughter – contracted coronavirus during the peak of the epidemic but continued working throughout his illness.
But there have been growing rumblings in Whitehall about the civil service’s response to the crisis and questions about whether, given his twin responsibilities, Sir Mark had too much on his plate.
The union representing senior civil servants – the FDA – said Sir Mark had been deliberately undermined, and accused No 10 “or those around it” of conducting “cowardly” anonymous briefings against him.
FDA General Secretary Dave Penman said the way Sir Mark had been treated was likely to put off talented applicants for similar jobs in the future.
The roles of cabinet secretary and national security adviser will now be separated with David Frost, the PM’s chief Brexit negotiator, taking on the latter.
After he leaves in September, Sir Mark will sit as a cross-bench peer in the House of Lords and also chair a new panel on global economy security as the UK takes over the presidency of the G7.