Sinn Fein, the political wing of the IRA during the Troubles,​ has won a dramatic surge in support from voters in Ireland’s general election, setting it on course to win a record number of seats in parliament.

Early results from Saturday’s election suggested the left-wing party may gain more than 30 seats – a historic high in modern times - as it secured a 24.5 per cent share of first-preference votes.

Fianna Fail (FF) and Fine Gael (FG) both faced the prospects of a dwindling vote share with 22.2 per cent and 20.9 per cent respectively.

Leo Varadkar, the prime minister, was even outpaced by a Sinn Fein (SF) candidate in his own constituency. Although he did not lose his seat, he was not re-elected until the fifth round in a tense Dublin West vote count.

It marks the first time an Irish premier has not been re-elected during the first count in the nation's history under the proportional representation by means of the single transferable vote (PR - STV) system.

The deputy premier, Simon Coveney, also failed to be elected on first-count votes - eventually being returned to the Dail (parliament) on the eighth count in Cork South-Central. Meanwhile FG's minister for employment affairs and social protection, Regina Doherty, lost her seat in Meath East.

Ireland celebrates historic Yes vote on abortion referendum Show all 20 1 /20 Ireland celebrates historic Yes vote on abortion referendum Ireland celebrates historic Yes vote on abortion referendum Women in Dublin celebrate the result of yesterday's referendum on abortion law Reuters Ireland celebrates historic Yes vote on abortion referendum A woman in Dublin celebrates the result of yesterday's referendum Reuters Ireland celebrates historic Yes vote on abortion referendum Activists react at the count centre as votes are tallied folowing yesterday's referendum Reuters Ireland celebrates historic Yes vote on abortion referendum Co-Director of Together For Yes Ailbhe Smyth speaking to the media at the count in Dublin PA Ireland celebrates historic Yes vote on abortion referendum Yes voters react, as the results of the votes begin to come in PA Ireland celebrates historic Yes vote on abortion referendum Long time campaigner Annette Forde, from Drumcondra, at the count centre in Dublin's RDS as votes are counted PA Ireland celebrates historic Yes vote on abortion referendum Minister for Health Simon Harris (centre) with Fine Gael's Kate O'Connell and Housing Minister Eoghan Murphy (left) speaks to the media on arrival at the count centre PA Ireland celebrates historic Yes vote on abortion referendum Yes voters celebrate at the count centre in Dublin as official results for constituencies are announced PA Ireland celebrates historic Yes vote on abortion referendum Yes campaigners celebrate at the count in Dublin PA Ireland celebrates historic Yes vote on abortion referendum A woman writes a message on a mural to Savita Halappanava, a woman who died of pregnancy complications AFP/Getty Ireland celebrates historic Yes vote on abortion referendum Activists react at the count centre as votes are tallied folowing yesterday's referendum Reuters Ireland celebrates historic Yes vote on abortion referendum Sinn Fein leader Mary Lou McDonald reacts with a member of the Yes campaign PA Ireland celebrates historic Yes vote on abortion referendum Yes campaigners celebrate at the count in Dublin PA Ireland celebrates historic Yes vote on abortion referendum Yes campaigners react, as the results of the votes begin to come in Reuters Ireland celebrates historic Yes vote on abortion referendum Senator David Norris at the count centre in Dublin as votes are counted PA Ireland celebrates historic Yes vote on abortion referendum A woman sits in front of the Dublin mural of Savita Halappanavar, a woman who died of pregnancy complications PA Ireland celebrates historic Yes vote on abortion referendum Repeal supporters at Dublin's RDS await the start of the count last night PA Ireland celebrates historic Yes vote on abortion referendum Minister for Health Simon Harris is greeted by retired Supreme Court judge Catherine McGuinness at the count in Dublin PA Ireland celebrates historic Yes vote on abortion referendum Yes campaigners react, as the results of the votes begin to come in AP Ireland celebrates historic Yes vote on abortion referendum A Yes voter poses with a badge as votes are counted AFP/Getty

A period of uncertainty is now beginning, with politicians facing the process of forming a new government.

Before the vote FF ruled out going into coalition with FG for the first time, and both parties said they would not govern with Sinn Fein, citing its IRA past and economic policies. But FG leader Mr Varadkar has said he could be open to a deal with FF.

However in the immediate aftermath of the vote FF's leader Michael Martin - who himself was re-elected at the sixth stage of his constituency's poll - fell short of ruling out a partnership with SF.

Accusing some of "jumping the gun" on comments which appeared to leave the door open to a coalition, he added: "Today's a day to let the election happen, let the election unfold, let people enjoy their elections and so on. In the cold light of day, tomorrow and the day after, we will assess where we are, because I am not taking anything for granted."

A member of the FF frontbench team said he believed a Fianna Fail-Sinn Fein government would emerge, according to Fiach Kelly, deputy political editor of the Irish Times.

Mr Varadkar was more clear in his rebuttal of Sinn Fein following his re-election.

"Nobody can be forced into some sort of forced marriage or forced coalition", he said, adding: "In order to form a government together you have to have roughly the same views around the courts, criminal justice system, around how the economy should be run and also how democracy should function and that is what makes my party Fine Gael not compatible with Sinn Fein."

Since 2016, the government has comprised a minority coalition between FG and independents.

But both FG and FF said before the election they would look to smaller parties to form a government, requiring the support of their rivals in a “confidence and supply” deal.

Sinn Fein, which has reinvented itself as Ireland’s main left-wing party, is likely to fall behind the other two because it fielded only 42 candidates for the 159 seats contested in the 160-seat Dail.

Jonathan Evershed, a researcher in government and politics at University College Cork, said both FF and FG would face major pressure to row back from their refusal to work with SF.

“Based on emerging numbers, there is no route to government that doesn’t involve working with Sinn Fein in one way or another,” he said.

According to Ronan Burtenshaw, of Tribune magazine, the combined vote of Fianna Fail and Fine Gael, which is seen as more right-wing than its rival, has fallen over 40 years, from 81.1 per cent in 1977 to 44.6 per cent now.

Counting under Ireland’s STV system could go on for a day or more in the 39 constituencies. The final and potentially decisive seats may not be filled until Monday or even later.

In the key seat of Dublin Central, Mary Lou McDonald, the Sinn Fein leader, led the way on 36 per cent - more than twice the number of votes needed for election.

Polls showed voters were motivated by issues such as health and housing, on which Sinn Fein focused.

The two big parties are likely to want to avoid a second election that could allow further gains for their up-and-coming rival.