Theresa May and Jeremy Corbyn have led tributes to the UK’s top civil servant who is stepping down due to ill health.
Sir Jeremy, cabinet secretary since 2012 and head of the civil service since 2014, was already on a leave of absence while being treated for cancer.
Mrs May said he had “made a contribution to public life few in our country can match”.
Mr Corbyn said he was an “impressive, well-informed and dedicated public servant”.
Sir Jeremy is being succeeded by Sir Mark Sedwill, who had been standing in for him since June.
The cabinet secretary is the prime minister’s principal adviser, and as head of the civil service is in charge of 500,000 public servants across the country.
In a statement announcing his decision to step down, Sir Jeremy said the job had been “the greatest privilege of my career”.
By James Landale, BBC diplomatic correspondent
You may not have heard of Sir Jeremy Heywood, but over the past two decades he has had a huge influence over how you have been governed.
As one of the most powerful public servants in the land, he served four prime ministers – managing Tony Blair’s differences with his chancellor, organising Gordon Brown’s occasionally chaotic Downing Street, holding the Tory-Lib Dem coalition together, and finally supporting Theresa May’s minority administration.
To his many admirers, Sir Jeremy was the chief engineer of the ship of state, the Whitehall fixer with a huge brain who sorted problems and made things happen.
To his critics, he was Sir Cover Up, an establishment figure who resisted official transparency.
Either way, Sir Jeremy’s departure leaves a huge hole at the heart of the British state.
It is a hole that his successor must now fill as the civil service faces the enormous challenge of governance that is Brexit.
Mrs May said: “Jeremy has given exemplary service to the public in his civil service career. He has worked constantly to improve our country’s future and to deliver for the public, serving prime ministers and ministers of all parties with distinction in the finest traditions of the civil service.
“I am personally grateful to him for the support he has given me as prime minister. He has made an enormous contribution to public life in our country and will be sorely missed.”
- Sir Jeremy Heywood to take break for cancer treatment
- Top civil servant Sir Jeremy Heywood treated for cancer
- Profile: Jeremy Heywood – the next Cabinet Secretary
Sir Jeremy, who joined the civil service as an economist in the Health and Safety Executive 35 years ago, said he still had the “desire to serve my country and to make a positive difference”.
“It is with great sadness therefore that, on medical advice, I must now retire,” he said.
“Since joining the civil service, I have had the privilege of supporting, at close quarters, four prime ministers, two Conservative and two Labour, and the first coalition government for decades, with its first full-time deputy prime minister.
“Throughout my career, I have seen it as my responsibility to look for fresh angles, to challenge lazy thinking and to work with colleagues to find solutions rather than simply identifying problems and obstacles that everyone can admire.”
Notable issues Sir Jeremy worked on were the response to the 1990s exchange rate mechanism crisis and the 2008-09 credit crunch and financial crisis.
On Brexit, he said he was “particularly proud of the work Whitehall has done in seeking to bring clarity, shape and practical options to the table for ministers to discuss”.
He praised the state of the civil service now, adding: “Despite a number of recent ‘noises off’ from anonymous commentators, I believe that the service is in robust health, well-equipped to provide the support the country needs over the coming months and years.”
If you enjoyed our content, we'd really appreciate some "love" with a share or two.
And ... Don't forget to have fun!