Joseph Kinyua, who is one of Kenya's longest-serving civil servants in history, has exited the stage.
Kinyua, 70, has served under all the administrations, except for President Jomo Kenyatta.
Thursday, October 27, marked the end to the eventful career.
However, President William Ruto could still appoint him in another capacity if he deems fit.
Kinyua has served under presidents Daniel Moi, Mwai Kibaki, Uhuru Kenyatta and William Ruto.
On Thursday, his successor Felix Koskei, the former Agriculture CS during President Uhuru Kenyatta's first term, was sworn into office at State House, Nairobi in a ceremony presided over by President William Ruto.
Kinyua said it was about time a "a new generation of civil servants" took over from him.
"I hand over the mantle of coordinating the public service to a new generation of civil servants. I thank you (President William Ruto) and your predecessors for according me the privilege to serve in four successful administrations, notably the second, third, fourth and fifth," he said.
"It has been a profound honour and a humbling journey. I am immensely grateful that I was accorded the rare opportunity to serve Kenya, and to serve the great men chosen by the people of Kenya to be the presidents of this country," said Kinyua.
Kinyua was appointed the Head of Public Service when President Uhuru Kenyatta assumed office in April 2013.
President Kenyatta's confidants, in a past interview with The Standard, described Kinyua as a "a workaholic and incorruptible person".
Prior to joining President Kenyatta's administration, Kinyua served as the Permanent Secretary in the Treasury ministry for nearly a decade.
He played an important role in implementing President Mwai Kibaki's celebrated economic policies.
Kinyua holds a Bachelor's and Master's degrees in Economics from the University of Nairobi.