Northern Ireland's retiring First Minister Peter Robinson has insisted he is leaving politics on his own terms.
Mr Robinson, who is also resigning as Democratic Unionist leader, said he is stepping down content that in his 40-year career he has done his best for Northern Ireland and the cause of unionism.
The 66-year-old said he would exit around the new year period, leaving his successor sufficient time to prepare for next May's Assembly election.
His announcement, which was widely expected, came days after he struck a political deal with his partners-in-government Sinn Fein, and the UK and Irish governments, which effectively saved the power-sharing coalition from threatened collapse.
Mr Robinson faced criticised from some quarters over his handling of the recent political crisis at Stormont and was also forced to strongly deny allegations of corruption, levelled under parliamentary privilege by a loyalist blogger, related to Northern Ireland's biggest ever property sale.
But the DUP leader insisted he was not under any internal party pressure to stand aside. He also denied his departure was due to the heart attack he suffered in May.
"It's entirely on my own terms," Mr Robinson said of his retirement. "I am probably the first unionist leader who will say afterwards that I left entirely on my own terms."
He added: "The fact is if I wanted to stay the party officers and party would have been fully supportive, the reality of course is I am almost 67 years of age, these are five-year terms we are looking into - it's unrealistic to go on for a third term in the top post.
"So I look forward to the new challenges my life will have, but I think over these last number of years Northern Ireland has made very real progress."
Mr Robinson said he does not care how history judges him, but said he is satisfied he has always done his best.
"All any individual can do is to do their best and, if they have been genuinely trying to move Northern Ireland forward, then how history judges them is something for future generations," he said.
"I am content that I have done my best, I have laid out a strategy that I think is in the interests of the unionist community."
He added: "Politics is a wee bit like a river - it continues to flow, there's never any end point, so you really have to decide at what stage you step off and end your journey.
"And in Northern Ireland politics there are so many developments, so many layers, it is always difficult to find a chapter end, but I think if you look over the last few days with the agreement that has been reached, the fact we have an Assembly election coming up in a few months' time, it seems to be exactly the right time to stand down and to give a new leader the opportunity to get settled in before the election comes round."
Mr Robinson said he had wanted to stabilise the power-sharing administration in Belfast before stepping aside.
North Belfast MP Nigel Dodds will be among the favourites to take over as DUP leader.
However with Mr Dodds based in Westminster, another senior party figure could take on the role of Stormont First Minister.
Finance Minister Arlene Foster has been touted as a potential leader of the power-sharing coalition.
Mr Robinson, who replaced Ian Paisley as first minister and DUP leader in 2008, said he had wanted to secure a number of specific objectives before leaving - including saving the power-sharing government, the DUP retaking the East Belfast Westminster seat he lost in 2010 and setting a date for Northern Ireland to determine its own corporation tax rate.
With all those accomplished, he said the time was right to step aside.
Tuesday's Fresh Start agreement resolved the wrangle over the non-implementation of the UK Government's welfare reforms, and a number of other disputes which had pushed the coalition Executive to the verge of collapse, including the fall-out from a murder linked to the Provisional IRA and an acute budgetary crisis.
However, the accord has been fiercely criticised by victims' campaigners for failing to secure consensus on new mechanisms to address the legacy of the Troubles.