Update - 11.52pm: The Stormont election is set to deliver a significant boost to nationalism at the expense of unionists.

Sinn Fein's vote has surged and the republicans could come within a seat or two of drawing level with the DUP - a party that came into the snap election holding 10 more seats.

Ulster Unionist leader Mike Nesbitt announced his resignation after his party suffered losses in a poll he predicted would deliver big gains.

Whatever the final shakedown when the counts conclude on Saturday, unionist representatives are unlikely to hold a symbolic overall majority in the slimmed-down Assembly chamber. They are still set to secure more seats than nationalists and republicans - given the number of cross-community Assembly members - but the gap will have narrowed sharply.

While Mr Nesbitt held his Assembly seat, other high-profile MLAs were not so lucky.

The SDLP's Alex Attwood, the UUP's Danny Kennedy, and the DUP's Nelson McCausland and Lord Morrow were four former Executive ministers who failed to secure a return to a Stormont legislature that is being cut from 108 to 90 members.

Away from Mr Nesbitt's dramatic announcement, the story of the election has been the surge in support for Sinn Fein.

The republican party came extremely close to securing more first preference votes than the long-time largest party, the DUP.

While the DUP saw its vote dip, the travails of the UUP means it is still set to reaffirm its position as the main voice of unionism.

Party insiders will take some solace from that, given so much of the election campaign was focused on the party's handling of a botched green energy scheme.

With the UUP failing to make any ground on the DUP, former TV anchor Mr Nesbitt fell on his sword.

His campaign pledge to transfer a second preference vote to the nationalist SDLP appears to have been his undoing, with unionist voters clearly not keen on him voicing support for any candidate who favoured a united Ireland.

Indicating that he will remain in position while his successor is found, Mr Nesbitt said it had been an "absolute honour" to lead the party.

"In pure terms, the buck stops here," he said.

He said his real regret was that Northern Ireland society appeared to have emerged from the election more polarised.

Mr Nesbitt said the electorate had rejected his hope for a post-sectarian vote.

"We will get there," he said. "Some day Northern Ireland will vote as a normal democracy. We will vote in a post-sectarian election, but it's now clear it will not happen during the duration of my political career."

Mr Nesbitt will remain a Strangford MLA.

Sinn Fein'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 the Renewable Heat Incentive (RHI) - an error-ridden scheme that left Stormont facing a potential overspend of almost £500 million.

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 re-imposition 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.

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

Update - 8.10pm: Ulster Unionist leader Mike Nesbitt has quit after his party's poor showing in the Assembly election.

With the UUP failing to make any ground on the Democratic Unionists, and losing a number of high-profile seats, the former TV anchor fell on his sword.

His campaign pledge to transfer a second preference vote to the nationalist SDLP appears to have been his undoing, with unionist voters clearly not keen on him voicing support for any candidate that favoured a united Ireland.

He said that he will remain in position while his successor is found.

Update -7.50pm: Sinn Fein and the Democratic Unionists are on course to reinforce their power at Stormont.

Counting is still under way in Northern Ireland's Assembly election but DUP Leader Arlene Foster says it appears to have been a "very good day" for Sinn Fein.

So far, 42 of the 90 available seats have been filled.

Update - 6.15pm: Arlene Foster has been formally elected in Fermanagh South Tyrone.

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.

Update - 5.55pm: In Belfast West Alex Maskey (Sinn Féin) and Gerry Carroll (People Before Profit) both retained their seats after an interim declaration in round three of the count.

Update - 5.45pm: SDLP leader Colum Eastwood said Sinn Féin were the "net beneficiaries" of a huge nationalist turnout intent on punishing Mrs Foster.

"The Sinn Féin 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 Féin," he said.

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

Mr Eastwood failed to top the poll in his Foyle constituency - cradle of the SDLP - where Sinn Féin's Elisha McCallion romped home almost 2,000 votes over the quota.

Putting a brave face on the result, Mr Eastwood claimed his party was not interested in topping polls but will be happy to increase its vote and retain its two seats in Derry.

The SDLP leader believes his party support will remain steady.

"Our overall vote is probably in and around where it was, it is just that Sinn Féin have been the net beneficiaries of a huge nationalist turnout to punish Arlene Foster.

"That seems very, very clear now."

Mr Eastwood also paid tribute to SDLP stalwart Mr Attwood who lost his seat in West Belfast.

(left to right) SDLP member Margaret Walsh, SDLP candidate Alex Attwood, and SDLP candidate Nicola Mallon walking into the Titanic Exhibition Centre, Belfast, today.

"Alex has given decades of service to Ireland and he has done an amazing job and given an enormous contribution to our peace process and to our politics .

"We'll miss him very much."

DUP East Belfast MP Gavin Robinson said the party's vote had held up well across the constituencies so far.

"All the circumstances were stacked against us. You will see people want to see a return to Stormont and they believe that we are the right party to lead unionism."

He said Arlene Foster was the right person to lead the DUP.

"Despite the torrents of abuse and smears and innuendo that was levelled against her, the people are sticking with her," he said.

Update - 5.20pm: 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.

Update - 4.55pm: Sinn Féin has come within touching distance of polling the most first preference votes in the Northern Ireland Assembly election.

The Democratic Unionists maintained the top spot, despite their vote share falling as the Sinn Féin share surged.

The DUP notched 225,413 first preferences, down 1.11 percentage points on last year, to Sinn Féin'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 Féin's 27.91%.

Sinn Féin candidates for West Tyrone Barry McElduff (right) and Michaela Boyle celebrate having been deemed elected at the Omagh count centre.

The final break-down of seats may not 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.

Arriving at the Belfast count centre, Sinn Féin President Gerry Adams said: "It is a vote and mandate that will have to be respected by the two governments (UK and Irish), by all the other parties, for a step change, for an end to the old status quo, for a new beginning as to how we do our business here."

It will be hours before the wider picture is confirmed, but it is clear that the DUP and Sinn Féin are on course to retain their positions as Stormont's two largest parties.

The Ulster Unionists and nationalist SDLP have failed to make the inroads they predicted.

However, the vote share of the cross-community Alliance Party rose significantly.

Update - 4pm: DUP leader Arlene Foster has topped the poll in Fermanagh South Tyrone, but fallen short of passing the quota required for election on the first count.

In the Foyle constituency, where Elisha McCallion's poll-topping performance for Sinn Féin delivered a blow to the SDLP in its traditional heartland, she has called former Deputy First Minister Martin McGuinness "a giant".

The decision by Mr McGuinness to stand down and his ongoing battle with illness is being seen as factor in boosting the party's vote.

Ms McCallion said: "Martin McGuinness in this town is a giant, he is a legend and a hero and I have no doubt that the position he took in January has meant that the Sinn Fein vote throughout the six counties has increased in the way that it has.

"We are absolutely delighted that for the first time ever Sinn Fein have out-polled the SDLP here in Foyle.

"But it doesn't come as a surprise. We have been hearing this very clearly on the doors , people understand the politics and what we are about."

Update - 3.15pm: So far 12 of the 90 available seats have been filled, with Sinn Féin's northern leader Michelle O'Neill and Alliance Party leader Naomi Long among them.

Former Democratic Unionist communities minister Paul Givan was elected in Lagan Valley while Sinn Féin's former economy minister Mairtin O Muilleoir also secured his return to the Assembly chamber, romping home in south Belfast.

Alliance Party leader Naomi Long was later elected in east Belfast.

Among other confirmed results, Democratic Unionist Alex Easton, Alliance's Stephen Farry and Ulster Unionist Alan Chambers were elected in North Down while Sinn Féin's Elisha McCallion was elected in Foyle.

Long-standing SDLP Assembly member Alex Attwood has lost his seat in West Belfast after a strong performance from Sinn Féin.

Update - 2.30pm: First results are coming in the Northern Ireland Assembly election, with a big win for Sinn Féin in Belfast West.

Sinn Féin’s Orlaithi Flynn topped the poll there, while the party’s Máirtín Ó Muilleoir was also elected in South Belfast.

Orlaithi Flynn after being elected as the new Sinn Féin MLA for West Belfast at the Titanic Exhibition Centre, Belfast,

Three other seats have been filled in the North Down constituency - with one seat each for the UUP, DUP and Alliance parties.

Earlier: Turnout in the Northern Ireland Assembly election has hit its highest level since the year of the Good Friday peace agreement.

Almost two thirds of the electorate voted in yesterday's poll - with the future of powersharing hanging in the balance.

The number taking to the ballot boxes swelled to 64.78%, 10% higher than last year's Stormont poll.

A total of 812,783 votes were cast.

Northern Ireland election fought along "tribal lines" and could still lead to "stalemate" says @endamcclafferty pic.twitter.com/xVck5vXDum — BBC Daily Politics and Sunday Politics (@daily_politics) March 3, 2017

The snap Stormont Assembly election was called following January's collapse of the ministerial coalition with the DUP and Sinn Fén at its helm in a row over a botched green energy scheme.

Soaring viewing figures for the two main TV leaders' debates had hinted at a surge in voter engagement, something borne out on polling day.

What impact the increased turnout will have on the results will only start to become clear when the first returns start to filter through during Friday afternoon.

In the first Assembly election after devolution began, in June 1998, 69.88% turned out.

It came just months after the Belfast Agreement, which largely ended the 30-year conflict.

Some of the 18 constituency counts are set to extend into Saturday.

A total of 228 candidates are vying for the 90 seats in Stormont's slimmed-down devolved legislature.

The Assembly poll was the second in 10 months.

The last coalition executive led by the two largest parties at Stormont - the Democratic Unionists and Sinn Fein - collapsed in January, only eight months after last May's election.

Michelle O'Neill, leader of Sinn Fein in Northern Ireland, (left) arrives at the Seven Towers Leisure Centre, Ballymena.

They fell out over the unionist party's handling of a botched green energy scheme and are also at odds on a host of other issues.

If the former partners in government are again returned as the main players, they 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.

The Ulster Unionists and nationalist Social Democratic and Labour Party (SDLP), which have presented themselves as an alternative partnership, are bidding to wrest control away from the fractious former allies.

The cross-community Alliance Party is also hopeful of a strengthened mandate.

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.

While the Assembly ballot will not change how Theresa May's Government treats talks to leave the European Union, the border between Northern Ireland and the Republic of Ireland is a key Brexit issue.

Five Assembly seats are up for grabs in each constituency, with the overall number returned falling from 108 to 90 as a consequence of the implementation of previously agreed reform measures.

Northern Ireland uses the single transferable vote (STV) proportional representation electoral system.