By Conor Humphries and Padraic Halpin
Acting Irish Prime Minister Enda Kenny has taken a major step towards forming a new government nine weeks after the republic's national election.
Fine Gael and Fianna Fáil -- Ireland's two main parties -- struck a deal on Friday that will lead to a new coalition.
Fianna Fáil will stay in opposition but allow Fine Gael to govern for the next two years.
Under the deal announced on Friday Fianna Fail will abstain in key votes, leaving Kenny's Fine Gael just six votes short of the 58 needed to pass legislation.
The party has been in talks with independents for weeks and senior members have voiced confidence they can secure their backing.
"Fine Gael and Fianna Fail have reached a political agreement to facilitate a Fine Gael-led minority government," the parties said in a joint statement.
The two parties will finalise the text of the agreement and each has to approve it, they said.
The agreement will last for three annual budgets, meaning the minority government would last until October 2018, a source familiar with the arrangement told Reuters.
It includes an agreed policy framework on issues such as taxation, public sector pay and housing.
Ireland joined a growing list of EU countries suffering political paralysis on February 26 when voters angry at the meagre benefits from a brisk economic recovery ousted the coalition government but failed to pick a clear alternative.
Since then Kenny has failed in three parliamentary votes to be re-elected.
"It has been a tortuous, long and difficult, at times, process," Fianna Fail negotiator Michael McGrath told reporters after announcing the deal.
Talks with independent deputies were scheduled for later on Friday evening.
Wednesday is the earliest date a vote could be scheduled in parliament to re-elect Kenny as prime minister.
Fine Gael and Fianna Fail are both centre-right and differ little on policy but have been bitter foes for decades, tracing their rivalry back almost a century to Ireland's civil war.