Sinn Féin has emerged as the main beneficiary of a snap election to Northern Ireland's devolved regional assembly at Stormont. The Irish republican party, which has links to the Provisional IRA, saw a four-point jump in support. It finished just one seat short of the Democratic Unionist Party (DUP), founded by the Rev Ian Paisley and the more hardline of parties which campaigns to remain in the UK.

The election, just nine months after the last scheduled vote, was forced on an angry and unwilling electorate following a collapse of trust between the DUP and Sinn Féin, parties which must share executive power in order for powers from Westminster to be devolved.

A botched green energy system, enacted by the DUP, which may run £500m ($614.85m) over budget was the main issue over which relations soured and eventually broke down.

But Sinn Féin also capitalised on issues such as "respect" and "equality", core values of the 1998 Good Friday peace accord. The party has accused its larger coalition partner of ruling in the high-handed and dismissive manner of the once-monolithic and reactionary Unionist Party which governed Northern Ireland unfettered for 50 years until 1972 and the Troubles.

Sinn Féin portrayed itself as a discriminated-against equal partner and cited a range of issues – including a long-promised Irish language act and the threatened return of a hard border between both states in Ireland following Brexit.

The party skilfully employed the retirement on health grounds of Martin McGuinness, the outgoing deputy First Minister and one-time IRA commander, portraying him as a committed peacemaker and stalwart in the face of old-fashioned unionist obduracy. It selected Michelle O'Neill, who has no personal involvement with the Provisionals, as its flagbearer in Northern Ireland. The party is still headed by Gerry Adams – who has been accused of being a veteran IRA man, an accusation he denies and now leads the all-Ireland organisation from the Dáil (Irish parliament).

Under the complicated structure of the 1998 Good Friday peace accord, the two main parties (and possibly others) must share executive power at Stormont and deliver an agreed programme for government.

The DUP ran a more cautious and defensive campaign, concentrating on getting it significant core vote to the polls by raising the unionist spectre of Sinn Féin becoming the largest party and securing the position of First Minister. DUP leader Arlene Foster fought a rear-guard battle, refusing questions at her manifesto launch (claiming she had "man-flu") and declining interviews with the BBC and ITN.

Opponents in all parties accused her of adopting a hectoring and dismissive tone which was inflammatory and looks to have helped boost turnout among both an exasperated electorate and the Sinn Féin vote.

The DUP stuck to other traditional positions – withdrawal from the EU and the European single market as well as opposition to gay marriage among others – thus bolstering its bedrock support while alienating younger, more liberal voters and building soft support for Sinn Féin.

The election saw a jump in voter turnout to nearly 65% following a steady decline in recent polls. Sinn Féin benefitted from that, consolidating its position in its heartlands and diminishing its rivals, principally in the Social Democratic and Labour Party (SDLP).

That party, ostensibly a main architect of the Good Friday deal, lost its remaining seat in West Belfast – a key political battleground in nationalist and republican terms – and suffered setbacks in South Down as well as in Foyle, home of John Hume who helped found and lead the party to its prize of a peace settlement in 1998 and who co-won the Nobel Peace Prize.

The Ulster Unionists cast themselves in the election as a middle-of-the-road and liberal force, keen to do business post-election with the SDLP and other moderates. Mike Nesbitt, its leader and a former TV news anchor, will resign once a successor is selected following dismal results which fatally damaged his approach. Danny Kennedy, who spoke against his leader's call for unionists to transfer votes in favour of the SDLP, lost his seat. Other colleagues were defeated or resigned. Many of those who have been left standing, seem leaderless and lost.

Alliance, the most avowedly centrist party, doggedly maintained its position under its new leader Naomi Long. It retained its seats and has extended its popular support in some targeted areas outside its traditional home turf in and around Belfast.

The results pose additional problems for the British government which, along with Irish government, must guarantee the Good Friday political institutions.

As votes were being counted in Northern Ireland, Prime Minister Theresa May was drawing battle lines with the Scottish National Party in Glasgow. Rallying against a Brexit-inspired push for a second independence referendum there, she insisted the United Kingdom embodied "four nations, but at heart we are all one people".Sinn Féin hotly disputes both claims, while the DUP's role in the collapse of the last Stormont power-sharing executive has shown that the institutions of the Good Friday accord cannot be taken for granted.

Sinn Féin hotly disputes both claims, while the DUP's role in the collapse of the last Stormont power-sharing executive has shown that the institutions of the Good Friday accord cannot be taken for granted.

How Northern Ireland voted

<th>Party <th>Seats <th>Votes <th>Change
Democratic Unionist Party (DUP)2828.1%-1.1%
Sinn Féin2727.9%+3.9
SDLP1211.9%-0.1%
Ulster Unionist Party (UUP)1012.9%+0.3%
Alliance Party89.1%+2.1%
Green Party22.3%-0.4%
Others36.2%

Dan Keenan was an assistant editor at the Irish News in Belfast before joining the Irish Times in Dublin. During his 22 years at the newspaper, he covered Northern Ireland from the Belfast bureau. He is now carrying out research for a PhD in recent Irish history at the University of St Andrews.