Irish Prime Minister Bertie Ahern has announced he is to resign on 6 May.
Mr Ahern, 56, has been taoiseach since June 1997 and has been a member of the Irish Parliament for 31 years.
The announcement comes a day after Mr Ahern began a court challenge to limit the work of a public inquiry probing planning corruption in the 1990s.
The tribunal is probing Mr Ahern's personal finances. Mr Ahern has been leader of Fianna Fáil since 1994 and heads the coalition government.
Mr Ahern told a news conference he would tender his resignation as both taoiseach and Fianna Fáil leader on 6 May.
He said: "The priority I put above all others was to work for peace on this island, and I have given all to that cause.
"I know in my heart of hearts I have done no wrong and wronged no-one.
"My decision is motivated by what is best for the people. It is a personal decision.
"I will not allow issues related to my own person to dominate the people and the body politic."
1951: Born in Dublin
1977: First elected to the Dáil
1991-1994: Minister for finance
1994: Becomes Fianna Fáil leader
1997: Becomes taoiseach
2007: Leads Fianna Fáil to third election victory, begins third term as premier
Mr Ahern said he had nothing to fear from on-going inquiries about his finances at the tribunal into planning corruption.
"While I will be the first to admit that I've made mistakes in my life and in my career, one mistake I've never made was to enrich myself by misusing the trust of the people.
"I have never received a corrupt payment and I've never done anything to dishonour any office that I've ever held."
Mr Ahern will be remembered for his role in the negotiations leading up to the Good Friday Agreement of 1998.
When the talks at Stormont were in their crucial final stages, he returned from his mother's funeral to rejoin the negotiations.
He said on Wednesday: "The Good Friday Agreement now provides the political framework for the island to meet its full political potential."
HAVE YOUR SAY
I'll remember him as a good leader, whatever the inquiry brings to light
Mr Ahern has been the most successful politician in the Republic of Ireland since Eamon De Valera, winning three elections. He is Ireland's second-longest serving taoiseach.
BBC Northern Ireland political editor Mark Devenport described Mr Ahern's impending departure as "death by a thousand cuts".
"Bertie Ahern was coming under increasing pressure from the Mahon Tribunal," he said.
"I think he felt this wouldn't go away, and, if he didn't give a date for his departure, the Dublin media, in particular, would be relentless."
Politicians on both sides of the border have paid tribute to Mr Ahern.
Irish President Mary McAleese said: "His contributions to our thriving economy and to peace in Northern Ireland were hugely important."
Prime Minister Gordon Brown said he had made an "historic contribution in helping to bring peace to Northern Ireland, transforming Ireland's relationship with the UK, and playing a key role in the development of a forward looking and dynamic Europe".
Former Prime Minister Tony Blair said: "He will always be remembered for his crucial role in bringing about peace in Northern Ireland, for transforming relations between Britain and the Irish Republic and for presiding over a sustained period of economic and social advance in Ireland."
Sinn Fein President Gerry Adams said: "He is justifiably proud of the fact that he was the taoiseach who was in place and who, with the British prime minister and the rest of us, brought about the Good Friday Agreement and he deserves our thanks for that."