Sinn Féin has won the most first preference votes in an election in Northern Ireland for the first time, as counting continues.

250,388 first preference votes were cast for Sinn Féin, compared with 184,002 for the Democratic Unionist Party and 116,681 for the Alliance Party.

This means that it received 29% of first preference votes, compared with 21.3% for the DUP, 13.5% for Alliance, 11.2% for the Ulster Unionists and 9.1% for the SDLP.

With counting for the 90 Stormont seats continuing, the republican party had won 16 seats, well ahead of the Alliance on seven, the DUP on seven, the Ulster Unionists on three and the SDLP on one.

Sinn Féin is confident that when all votes are counted that will translate into having the most seats in the Stormont Assembly.

That will give it the right to nominate the First Minister, the first time in the history of Northern Ireland that the head of government would be a nationalist.

It is not the first time the top nationalist party has outpolled the top unionist party, with the SDLP eclipsing the Ulster Unionists by 22.0% to 21.3% in 1998.

However the UUP still won most seats with 28 to the SDLP’s 24.

The size of the margin of victory, 66,386, has surprised the vast majority of commentators and is likely to send shockwaves through the ranks of the DUP.

Naomi Long's Alliance Party looks set to be the other main winner from the election, with a surge of support for the cross-community party likely to make it the third largest at Stormont, ahead of the UUP and SDLP, who have both had disappointing results.

Ms Long topping the poll in East Belfast to be re-elected on the first count.

However, the counting process was slow, with just over a third of the 90 seats filled shortly before 10pm on Friday.

Sinn Féin leader Michelle O'Neill topped the poll for Sinn Féin in Mid-Ulster, while DUP leader Jeffrey Donaldson was elected on the first count in Lagan Valley.

He said he was delighted with his party's performance in the constituency, adding that it was too early to comment on the overall picture to say what the final outcome might be.

"I think it is going to be very tight at the end as to who will emerge as the largest party," he said.

"One of the key messages for me is that unionism simply can't afford the divisions that exist."

Jeffrey Donaldson said unionism cannot afford existing "divisions"

Ms O'Neill was surrounded by party colleagues and supporters as the result was announced in the Magherafelt count centre.

She received 10,845 first preference votes and the result was greeted by large cheers.

Speaking to reporters shortly before her election was announced, Ms O'Neill said she was "very grateful" to be with the people of Mid-Ulster.

Asked about the possibility of her taking the first minister role, she said: "It is very early to say, let's get all the votes counted.

"I feel very positive."

She said that Sinn Féin wanted to "together work in partnership with others".

"That is the only way we will achieve much, much more for people here, whether in terms of the cost-of-living crisis or trying to fix our health service."

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

Ms Long, speaking in Belfast, dedicated her victory to her father-in-law.

"It's been a good day so far for Alliance and obviously it's been a good day for me personally in East Belfast, and also for Peter McReynolds, and we expect that we will hold the two seats there.

"It's been quite an emotional election campaign for me. I lost my father-in-law in the last few weeks, and we buried him yesterday.

"I just want to dedicate this win to him, because without family I could not do what I do, and without their support I would not be where I am.

"I am just absolutely thrilled that I've polled so well and I really look forward to later on today and seeing all my colleagues bringing it home."

Alliance leader Naomi Long said it was a "good day" for the party

The first MLA elected to the Stormont Assembly declared an Alliance Party surge.

Kellie Armstrong was elected for the Strangford constituency on the first stage of the count with 7,015 votes.

Congratulated by Ms Long, Ms Armstrong said it was the start of a surge for the party in the Assembly elections.

"I'm absolutely delighted," Ms Armstrong said. "I've held back using the word surge until now but I think I'm feeling it now. I'm absolutely delighted to top the poll.

"I'm not going to say a tidal wave at this moment in time, because we've a long time to go yet, but it's amazing and it's being shown in the vote today."

Robin Swann was Stormont's health minister during the pandemic

Ulster Unionist Robin Swann, who was Northern Ireland's health minister during the Covid-19 pandemic, was elected after he topped the poll in his North Antrim constituency.

In North Down, independent candidate Alex Easton, who quit the DUP last year, topped the poll.

Speaking to the PA news agency shortly before being elected in Newry and Armagh, outgoing finance minister Conor Murphy rubbished the SDLP suggestion that voters had lent support to Sinn Féin.

"I heard that script in the 1990s about votes being lent," he said.

"The reality is that people go out and make a choice at the ballot.

"Sinn Fein presented a very positive campaign about what we have done in the Executive and the Assembly and what we want to do."

Counting to continue into early hours of Saturday

Counting is set to continue into the early hours of Saturday with some 239 candidates standing across 18 constituencies.

Five Assembly seats are up for grabs in each of the 18 constituencies.

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

The DUP won 28 seats at the last Assembly elections in 2017, just ahead of Sinn Féin which returned 27 MLAs.

Next was the SDLP with 12 seats, the Ulster Unionist Party with 10 seats, Alliance with eight seats, the Green Party with two seats, while People Before Profit and the TUV had one MLA each.

This year, the DUP has been regarded as playing it safe, running 30 candidates, while Sinn Féin is running 34.

Meanwhile, the UUP is running 27 candidates, the Alliance Party is running 24, the SDLP is fielding 22, TUV is putting up 19 candidates, the Green Party is running 18 and People Before Profit 12, as is Aontu, while the Workers Party is running six candidates and the PUP three.

The Irish Republican Socialist Party (IRSP) and the Socialist Party are each fielding two candidates while the Northern Ireland Conservatives, Cross Community Labour Alliance (CCLA), Resume NI and Heritage Party are each running one candidate.

There are 24 independent candidates.

DUP and Sinn Féin vying for top spot

The DUP and Sinn Féin are vying for top spot at Stormont, which comes with the entitlement to nominate the next first minister.

A unionist party has always taken the most seats in the Assembly, and previously the Stormont Parliament, since the formation of Northern Ireland in 1921.

While the office of the first and deputy first minister is an equal one with joint power, the allocation of the titles is regarded as symbolically important.

The Northern Ireland Protocol has cast a long shadow over the election campaign, following the resignation of first minister Paul Givan in February in an effort to force the British government to act over the post-Brexit trading arrangements.

This action left the Executive unable to fully function.

While ministers remained in post, they were restricted in the actions they could take.

Unionists object to the additional checks on goods arriving in Northern Ireland from Britain as a border in the Irish Sea.

SDLP leader Colum Eastwood said nationalists were motivated by the idea that they "should not be locked out of the first minister position"

SDLP leader Colum Eastwood appeared to play down expectations for his party as he arrived at Magherafelt.

He said that voters may have "lent" their vote to Sinn Féin.

"It's going to be a long day and maybe a long night as well," he told the PA news agency. "I think there has been a big vote for Sinn Féin on the nationalist side.

"People decided to send a very clear message that nationalists should not be locked out of the first minister position. I understand that motivation and I think a lot of people have lent Sinn Féin their vote."

But Mr Eastwood said votes were still being counted.

"It is going to be tough for us, because so many people have wanted to send a message to the DUP that nationalists shouldn't be locked out of the top position," he said.

DUP MP Sammy Wilson warned earlier that his party would not re-enter the Executive without Government action over the protocol.

He told the BBC: "I'll tell you one thing, if there's no legislation in the Queen's Speech and no plans to deal with the protocol then we've made it very clear the assembly can't function if the poison of the protocol is still there."

Sinn Féin leader Mary Lou McDonald has said that it is a "great day for nationalists, for republicans".

Speaking to RTÉ News, Ms McDonald said: "The office is a joint office. The success of power-sharing relies on the ability to share power and to be inclusive and collaborative and work in partnership."

Additional reporting by Conor Macauley and Vincent Kearney