Sinn Fein was last night on course for a clear win in the West Tyrone by-election.
As counting neared completion, Orfhlaith Begley was set to retain the seat with a comfortable majority.
It meant Sinn Fein's 17-year hold on the seat, which they first won in 2001, would continue.
The turnout, confirmed shortly before 12.40am this morning, was just over 55%.
Some 35,337 votes were cast out of the total 64,101 electorate.
The by-election was caused by the resignation of Barry McElduff in January.
He quit amid a storm after he appeared in a video with a loaf of Kingsmill bread on his head on the anniversary of the massacre of 10 Protestant workmen at Kingsmill.
Polling stations had opened across the constituency yesterday with counting starting shortly after 10pm.
The final ballot boxes arrived at the count centre at Omagh Leisure Centre shortly before midnight.
Turnout was 55.13% - down on the 62.8% figure for last June's General Election.
But it did not deprive Ms Begley, a 26-year-old solicitor, of her first elected position.
As counting continued into the early hours of this morning, it was clear Sinn Fein was holding on to the seat.
Indeed the main focus was on the size of their majority, and the impact that the McElduff controversy had on their vote.
Early tallies last night from the polling company LucidTalk suggested that Sinn Fein's vote was very slightly down.
Their figures suggested Sinn Fein had taken between 46-49% of the vote, the DUP had 22-23%, SDLP had 14-16%, UUP had 7-8% and Alliance had received 3-4%,
In 2017, Mr McElduff won with 22,069 (50%), well ahead of Thomas Buchanan (DUP) with 11,718 votes (26.9%), Daniel McCrossan (SDLP) with 5,635 votes (13%).
The by-election was triggered by the resignation of Mr McElduff earlier this year after he posted a controversial video on Twitter of him posing with a Kingsmill loaf of bread on his head, on same the same date as the anniversary of the 1976 IRA massacre of the same name.
Mr McElduff claimed he had not been aware of the date and it had not been in reference to the shootings, but he also apologised to the family of the victims.
He later resigned his seat over the controversy.
There had been speculation that an agreed victims candidate would stand, but all five main parties fielded candidates.
Mr Buchanan and Mr McCrossan ran again, while Chris Smyth stood for the Ulster Unionists and Stephen Donnelly for Alliance.
The counting of the votes started at Omagh Leisure Centre last night around 10.15pm.
However the final ballot boxes did not arrive from polling stations in Strabane until 11.40pm.
Verification of the votes took until 12.30am.
Earlier in the day there was a major security incident when a man was arrested on suspicion of possessing a firearm at a polling station in Greencastle.