THE surge of Sinn Fein to become the second largest party in the Dail Eireann has taken the political classes in the country completely unawares and left a massively complex situation in the formation of a new government.

The politicians and pundits alike, not to mention the public, appeared baffled as to what will happen next since none of the three major parties has sufficient numbers of TDs (MPs) to form a government meaning that only a coalition can take over.

Yet Fine Gael and Fianna Fail both ruled out working with Sinn Fein in government during the election campaign.

The Republic’s constitution means that Fine Gael, currently in power and led by Leo Varadkar as taioseach must stay in power until the Dail elects a new government, and that could take months as the various parties and independents jockey for power and positions.

READ MORE: Why Sinn Fein's election surge is such a victory for the party

The Irish Times helpfully explained the situation yesterday: “The State always has a government; this one will only cease to hold office when the next one is elected by the Dail – no matter how long it takes.

“When the Dail meets at noon on February 20, its first job will be to elect a Ceann Comhairle (Speaker) to chair its proceedings. The current Ceann Comhairle Sean O Fearghail intends to stand for a second term. Once that is done the next business of the House will be to hear nominations for taoiseach. As things stand no candidate will have a majority in the House, and nobody will be elected taoiseach.

“However, having lost a motion on his own nomination and therefore the confidence of the House, Varadkar will be obliged to tender his resignation as taoiseach to the president, which he would be expected to do immediately. But he does not leave office; nor do his ministers. Under Article 28 of the Constitution, the taoiseach and the government continue to hold office – and to discharge their duties as ministers – until a new government is appointed.”