Irish Prime Minister Enda Kenny is to step down as leader of Fine Gael from midnight, he has announced.
He will continue as taoiseach (prime minister) until the Dail (parliament) chooses a successor.
Mr Kenny, who was elected taoiseach in 2011, tendered his resignation in March, but has been acting prime minister since then.
He told a parliamentary party meeting on Wednesday that a successor would be appointed by 2 June.
The 66-year-old had been under pressure to resign from factions within his own party dissatisfied with his leadership.
The Fine Gael leadership contest will begin on Thursday with the new leader to be announced after an electoral college of the parliamentary party, county councillors and party members have their say.
The two favourites are Leo Varadkar, who is the son of an Indian immigrant, and Simon Coveney, whose father was also a government minister.
The former British prime minister, David Cameron, said Mr Kenny “was a strong leader for Ireland, a great partner for the UK, and remains a good friend”.
Sinn Féin president Gerry Adams said Mr Kenny “did his best from his perspective” but his “political legacy is dominated by crisis, chaos, and chronic lack of accountability”.
Alliance Party leader Naomi Long said Mr Kenny will be “remembered in Northern Ireland for showing a true commitment to the peace process”.