Micheal Martin was elected Ireland's new prime minister on Saturday, after his centre-right Fianna Fail party sealed a historic coalition deal with long-time rivals Fine Gael as well as the Green Party.

The election of Martin, who replaced Leo Varadkar as taoiseach during a special sitting of the Dail parliament, comes after months of negotiations between the parties following a February election.

"To be elected to serve as taoiseach of a free republic is one of the greatest honours which anyone can receive," Martin told parliament.

The 59-year-old political veteran said the most immediate issue facing Ireland was the impact of the coronavirus pandemic.

Fianna Fail leader Micheal Martin (R) talks with the man who he has replaced as Irish prime minister, Leo Varadkar after the vote at a special sitting of the Dail parliament
Fianna Fail leader Micheal Martin (R) talks with the man who he has replaced as Irish prime minister, Leo Varadkar after the vote at a special sitting of the Dail parliament MAXWELLS - IRISH GOVERNMENT POOL / MAXWELLS

"At the same time, we know that there are other great challenges which we faced before the pandemic and which remain to be overcome."

These challenges included affordable housing, hospital waiting times and climate change, the he said.

Ireland also faces the economic fallout from the virus as well as a potential no-deal Brexit.

Fianna Fail leader Micheal Martin waves after being elected Ireland's new prime minister
Fianna Fail leader Micheal Martin waves after being elected Ireland's new prime minister AFP / Paul Faith

Among Martin's ministerial nominations, Fine Gael leader Varadkar was named tanaiste -- deputy prime minister -- and head of the department of enterprise, trade and employment.

Green Party leader Eamon Ryan is set to lead offices of climate change and transport, as incumbent foreign minister Simon Coveney -- who led the Republic in Brexit talks -- was named to remain in office.

Incumbent finance minister Paschal Donohoe is also due to remain in-post as he runs as a candidate to head the Eurogroup, which brings together the eurozone finance ministers.

But key housing and healthcare portfolios were taken from senior Fine Gael figures after the party was routed at the election for its failures in those arenas.

"There is no time for quietly settling in, every minister has a substantial role to play," Martin said.

Micheal Martin, a veteran of the Irish opposition has been elected prime minister of Ireland
Micheal Martin, a veteran of the Irish opposition has been elected prime minister of Ireland AFPTV / Joe STENSON

He takes over from centre-right Varadkar in an historic reconciliation of Ireland's two major parties -- and sworn political rivals -- which dates back to the foundation of the state a century ago.

Varadkar said the agreement meant that "today civil war politics ends in our parliament".

"Two great parties coming together with another great party, the Green Party, to offer what this country needs, a stable government for the betterment of our country and for the betterment of our world."

Under the agreement, Fine Gael is set to regain the post of taoiseach at the end of 2022.

The two centre-right parties needed the support of the Greens to have a working majority in the Irish parliament, their collective total adding up to 85 seats in the 160-seat chamber.

Fianna Fail won the most seats in February's election with 38, while Fine Gael received 35 seats and the Greens 12.

Green Party leader Eamon Ryan spoke of "difficult decisions" ahead for the coalition, especially with regards to the economy.

The political deal notably excludes republicans Sinn Fein from power.

The one-time fringe party won the popular vote with 24.5 percent of first preference ballots -- and claimed 37 seats -- to become the second-largest force in parliament and is expected to become the main opposition party.

The coalition deal has prompted anger among Sinn Fein members and the party's leader, Mary Lou McDonald, who told parliament that the coalition was born out of "necessity and not of ambition".

"Faced with the prospect of losing their grip on power, Fianna Fail and Fine Gael have circled the wagons," she added.