A general election surge in support for Sinn Fein, once the political wing of the IRA, on Sunday upset Ireland's traditional two-party grip on power.

Irish officials were counting votes following Saturday's polls with an exit poll forecasting Prime Minister Leo Varadkar's incumbent Fine Gael party facing a three-way dead heat.

The Ipsos MRBI survey of around 5,000 voters predicted that centre-right rivals Fine Gael and Fianna Fail and leftists Sinn Fein had each received 22 per cent of first preference votes.

Prime Minister Leo Varadkar (C) focused his campaign on Brexit but voters seemed more concerned with healthcare and housing
Prime Minister Leo Varadkar (C) focused his campaign on Brexit but voters seemed more concerned with healthcare and housing AFP / Ben STANSALL

Fine Gael and Fianna Fail have traditionally taken turns in power.

In Dublin's main count centre, staff unsealed and emptied black ballot boxes onto ranks of tables as party members anxiously looked on.

Ireland uses a single transferable vote system to elect multiple deputies from each of the 39 constituencies, meaning the rounds of counting could take at least two days.

The exit poll shows a close three-way tie but the Irish voting system makes it hard to to extrapolate a likely seat forecast from the first preference votes exit poll
The exit poll shows a close three-way tie but the Irish voting system makes it hard to to extrapolate a likely seat forecast from the first preference votes exit poll AFP / Paul Faith

Due to the transfers, a likely seat forecast cannot be extrapolated from the first preference votes exit poll.

Mary Lou McDonald's Sinn Fein has a strong showing in the exit poll but both main parties have ruled out forming a coalition with it
Mary Lou McDonald's Sinn Fein has a strong showing in the exit poll but both main parties have ruled out forming a coalition with it AFP / Ben STANSALL

Sinn Fein leader Mary Lou McDonald arrived at the count centre to a huge fanfare from supporters.

"This is changing the shape of an old Irish politics. This is not a transient thing, this is just the beginning," she told reporters.

In the last election in 2016, Sinn Fein got 13.8 percent of the vote.

McDonald said the two other main parties were "still in a state of denial, they're still not listening to what the people have said".

The exit poll suggests little separates the three main parties
The exit poll suggests little separates the three main parties AFP / Ben STANSALL

The 50-year-old said she ideally wanted "a government with no Fianna Fail or no Fine Gael in it" and had made contact with smaller parties, but added: "I will talk to and listen to everybody."

Sinn Fein did not field enough candidates to form a majority government.

Earlier, security intervened to calm the mood after Sinn Fein supporters sang a chorus glorifying the early IRA's fight for independence from Britain.

IMAGESVotes are counted in Dublin for the Ireland general elections. Prime minister Leo Varadkar's party is expected to end up in a historic three-way tie, after a surge from republican party Sinn Fein.
IMAGESVotes are counted in Dublin for the Ireland general elections. Prime minister Leo Varadkar's party is expected to end up in a historic three-way tie, after a surge from republican party Sinn Fein. AFPTV / Mathilde BELLENGER

Sinn Fein were the political wing of the now-defunct Irish Republican Army paramilitary group.

"This is not just a change election -- it has changed Irish elections themselves for the foreseeable future," wrote columnist Fintan O'Toole in The Irish Times newspaper.

"For a huge chunk of voters, change is being seen as something that comes from outside the system."

The exit poll shows a close three-way tie but the Irish voting system makes it hard to to extrapolate a likely seat forecast from the first preference votes exit poll
The exit poll shows a close three-way tie but the Irish voting system makes it hard to to extrapolate a likely seat forecast from the first preference votes exit poll AFP / Ben STANSALL

Sinn Fein was "once inextricable from the IRA" and considered a "pariah" he said, but younger voters in particular were drawn by their promise of addressing income inequality.

The Ipsos MRBI exit poll put Fine Gael on 22.4 percent, Sinn Fein on 22.3 percent and Fianna Fail on 22.2 percent.

The Greens were next on 7.9 percent and Labour on 4.6 percent. They could play a role in coalition-forming.

Notably, the exit poll put Sinn Fein comfortably ahead with voters aged 18-24 and 25-34, with support at 32 percent in each age bracket.

The survey has an estimated margin of error of 1.3 percent.

The 3.3 million-strong electorate was voting for some 159 seats in the Dail, the Republic of Ireland's lower house of parliament.

Sinn Fein's Donnchadh O Laoghaire was the first deputy returned, in the city of Cork.

Even once the make-up of the new chamber emerges, it could take much longer to cobble together a government.

Following Ireland's 2016 election it took 70 days before a new minority coalition government was formed under Fine Gael.

During this year's election campaign, Fine Gael and Fianna Fail both ruled out working with Sinn Fein, citing the party's past IRA links.

Fianna Fail leader Micheal Martin also said he would not back Fine Gael in a "grand coalition".

Varadkar, 41, became Ireland's prime minister in June 2017 on taking over the Fine Gael leadership from Enda Kenny, who led the party into power in 2011.

He plumped for an early election after successfully helping to broker a deal cushioning Britain's EU exit on January 31 by avoiding a hard border with Northern Ireland.

Varadkar's campaign was focused on Brexit -- but did not seem to land with voters more concerned with domestic issues.

Health ranked on 32 percent whilst housing and homelessness was on 26 percent.