Sinn Fein and the Democratic Unionists are on course to reinforce their grip on power at Stormont, with the republican party closing the gap on their unionist rivals

As the counting continues in the snap Assembly election, the former coalition partners look set to consolidate their respective pre-eminent positions within nationalism and unionism.

It has not been a good election for the Ulster Unionists and nationalist SDLP, both of which have failed to make the inroads they predicted.

The vote share of the cross-community Alliance Party has risen.

Sinn Fein came within touching distance of polling the most first preference votes for the first time.

The DUP maintained the top spot, despite their vote share falling as the Sinn Fein share surged.

The DUP notched 225,413 first preferences, down 1.11 percentage points on last year, to Sinn Fein's 224,245 - an increase of 3.89 percentage points.

In terms of the overall picture, the DUP secured 28.06% of first preferences to Sinn Fein's 27.91%

The final break-down of seats may not ultimately be as close, as results in the proportional representation contest rely on transfers from other parties, but the republicans were nevertheless buoyed by the result.

The party's northern leader Michelle O'Neill said: "I think it's a brilliant day for equality, I think it's a great day for democracy.

"I want to particularly commend all of our candidates that have been elected.

"The vote has increased. I think that is because people knew that action needed to be taken, they have had their say, we now need to get down to the business of fixing what's wrong and delivering for all citizens."

The poll was forced after Sinn Fein pulled the plug on the powersharing institutions in protest at DUP first minister Arlene Foster's handling of a botched green energy scheme - the Renewable Heat Incentive (RHI).

The campaign exposed other major policy disputes between the parties.

After being elected in her Fermanagh and South Tyrone constituency, Mrs Foster said: "I think it's very clear that was absolutely not about RHI, it may have been the excuse but it certainly wasn't the cause of the election.

"The cause of the election was Sinn Fein and republicanism wanting to rerun the election, they have mobilised their vote in a very effective way.

"I am pleased that the DUP has come out as the largest party in terms of votes. It is very clear in terms of unionism that it is the Democratic Unionist Party that speaks for unionism."

She added: "I do hope devolution will get back up and running as quickly as possible."

The DUP and Sinn Fein will have three weeks to resolve their multiple differences and form a new administration.

The reimposition of direct rule from London is on the cards if the post-election talks fail.

If the three-week post-election deadline passes, Northern Ireland Secretary James Brokenshire is legally obliged to call yet another election.

However, in those circumstances, the Government may pass emergency legislation to suspend devolution for the first time in 10 years ahead of more lengthy negotiations.

In a major blow to the UUP, party stalwart Danny Kennedy lost his seat in Newry and Armagh.

His elimination followed the loss of another Stormont veteran - the SDLP's Alex Attwood in west Belfast.

SDLP leader Colum Eastwood said Sinn Fein were the "net beneficiaries" of a huge nationalist turnout intent on punishing Mrs Foster.

"The Sinn Fein vote has gone up very highly, which is a result of the overall context of this election, which has been pitched as a battle between the DUP and Sinn Fein," he said.

"Those of us in the middle have been clearly squeezed."

One of the most significant moments of the furore around the Renewable Heat Incentive (RHI) was when former DUP minister Jonathan Bell broke party ranks to level a series of explosive allegations against Mrs Foster and party special advisers - accusations they denied.

He was subsequently suspended by the party and stood in the election as an independent in the Strangford constituency. It was a move that did not pay off, as he was eliminated at stage seven of Friday's count.