Mike Moore has announced he is leaving his job as the New Zealand ambassador to the United States.
Mr Moore suffered a stroke earlier this year, and in a statement given to staff said he would leave the job in mid-December.
He has held the diplomatic post in Washington since 2010.
Mr Moore was the Prime Minister of New Zealand for two months in 1990, before he became the Director-General of the World Trade Organisation, and then took up the post in Washington.
"I am now the longest serving continuous ambassador to the US. I didn't seek this job but felt I should do it because great issues were at stake. The time was ripe for it," Mr Moore said.
Mr Moore said trade had been a particular focus during his time as ambassador while the Trans Pacific Partnership (TPP) was negotiated.
"We have worked hard getting acceptance for this by Congress. I believe it will be forthcoming. It will be a question of time."
"On a security level things have moved up several notches. You are aware of the many exercises we do together and the important contribution we are making in the struggle against ISIS (Islamic State)."
Mr Moore was Prime Minister of New Zealand during the last days of the fourth Labour Government.
"In my political life I have always been in the wrong place at the wrong time but the mission I was given here was correct and the timing was right."
Mr Moore thanked Foreign Minister Murray McCully and the Ministry of Foreign Affairs and Trade for their kindness to him and his wife Yvonne.
"We will go home content that we did our best. Pity the old body gave up."