Downing Street has denied accusations that the appointment of Simon Case as Cabinet Secretary was a "stitch-up".
Mr Case, currently the permanent secretary in 10 Downing Street, was made the UK's top civil servant on Tuesday after Boris Johnson gave him the job of Cabinet Secretary and head of the civil service.
Mr Case spent almost two years working as the Duke of Cambridge's right-hand man before temporarily moving to Number 10 earlier this year to assist with the coronavirus response.
His promotion comes after the outgoing Sir Mark Sedwill announced his departure from the role in June amid reports of clashes with Dominic Cummings, the Prime Minister's de facto chief of staff.
The 41-year-old becomes the youngest Cabinet Secretary in several decades, only second to Lord Hankey, who served David Lloyd George's war cabinet during the First World War and held the position into the late 1930s.
Number 10 was forced to deny that it had been Mr Johnson's intention since May when Mr Case was given the secondment to Downing Street to crowbar him into the more senior job of overseeing the day-to-day running of government.
The Prime Minister's official spokesman, asked whether the timetable behind the appointment had been a "stitch-up", said: "No, you can see the PM's words this morning – he thinks he will make a fantastic Cabinet Secretary and head of the civil service.
"He has years of experience at the heart of government working for a number of prime ministers and working for the royal household and the PM believes that will make him ideally suited for this crucial role.
"The appointment was made entirely in-line with the process that is set out in the cabinet manual and was overseen by the first civil service commissioner Ian Watmore."
Apart from his role with the Duke of Cambridge, Mr Case's career has included helping deliver the 2012 London Olympics, a tenure as private secretary to former prime minister David Cameron, and working on the Irish border issue created by Brexit.
The Times reported that the Cambridge graduate did not initially seek the top job but was asked to make a formal application by Downing Street.
The Prime Minister is understood, according to a Times Radio report which Number 10 did not deny, to have phoned William personally last week to "ask if he could pinch his man to be the new Cabinet Secretary", with Mr Case initially set to return to his duties at Kensington Palace.
The duke is said to have agreed given the tough circumstances faced by the country after the Covid-19 pandemic, with the station reporting that Mr Johnson and William have a good relationship dating back to the failed bid 10 years ago for England to host the 2018 World Cup.
Sir Mark will oversee one final Cabinet meeting next week before formally stepping down on September 9, with Mr Case to take over on the same day.
Mr Case's appointment marks the continued shake-up of Whitehall under Mr Johnson and his close aide Mr Cummings, with five departures of senior civil servants this year alone.
Apart from Sir Mark's exit, three permanent secretaries have resigned this year: the Home Office's Philip Rutnam, the Foreign and Commonwealth Office's Simon McDonald, who leaves his position on Tuesday and Richard Heaton from the Ministry of Justice.
And last week, Jonathan Slater was removed from the post of permanent secretary at the Department for Education following the controversy surrounding this year's A-levels and GCSEs, while Education Secretary Gavin Williamson, who came under pressure to resign following the exams fiasco, held on to his Cabinet job.
Mr Case, who joined the civil service in 2006, said the appointment was "an honour" and praised his predecessor for the "kindness and support" shown to him during his career.
"Over these few months of working on the Covid response, I have seen how much hard work is being done by the civil service to support the Government and our country through unprecedented times," he said.
"It is a privilege to come into this role to lead a service that is working day in, day out to deliver for people right across the country."
Lord (Gus) O'Donnell, who held the role of cabinet secretary between 2005 and 2011, said Mr Case would have to focus on mending Number 10's relationship with the civil service after the ousting of a number of permanent secretaries, while ministers had been permitted to keep their jobs.
Speaking to BBC Radio 4's Today programme, Lord O'Donnell said: "There's a big task for him but he has the trust of the Prime Minister, that's really important, and now he needs to get the trust across the civil service and his fellow permanent secretaries."