Sinn Fein is seeking to overtake the DUP and become the biggest party for the first time, which would give it the right to the post of first minister.

Sinn Fein achieved poll-topping results in nine districts, including Mid-Ulster, where the party's new leader in the North, Michelle O'Neill, was mobbed by supporters.

Ms O'Neill, the daughter of an IRA veteran with childhood memories of the Troubles, represents a leadership shift within Sinn Fein to the first post-conflict generation.

Last night's final Northern Ireland-wide total of first-preference votes - the core measure of party popularity - showed the DUP narrowly on top with 28.1pc, down one point from the last election 10 months ago.

Sinn Fein trailed with 27.9pc, up four points.

Unpredictable

Many analysts forecast that the DUP will stay barely ahead of Sinn Fein in seat numbers in the 90-member assembly when the final winners are declared, but it could come down to unpredictable handfuls of transferred votes.

With more than a third of winners declared last night, Sinn Fein had won 16 seats, the DUP 10, and four other parties the rest.

Commentators credited the Sinn Fein surge to Catholic voters' anger at the DUP, especially outgoing First Minister Arlene Foster, who was blamed for overseeing a wasteful 'green energy' programme and for fostering a culture of insult and disrespect toward Sinn Fein.