The Democratic Unionist party (DUP) is on track to lose three of its eight seats, which would leave Sinn Féin as the Northern Ireland party with most MPs.

The DUP lost the Lagan Valley seat vacated by its former leader, Sir Jeffrey Donaldson, who faces sexual offence charges, and suffered a stunning defeat in North Antrim where Ian Paisley lost a seat held by his family since 1970. It also lost South Antrim and had reduced majorities elsewhere.

The Traditional Unionist Voice (TUV), Ulster Unionists and Alliance were poised to take the DUP seats but the symbolic winner will be Sinn Féin which retained its seven seats and is on course to complete a hat-trick as the biggest party in local government, the Stormont assembly and Westminster.

The DUP leader, Gavin Robinson, fended off a challenge from Alliance’s Naomi Long in East Belfast but that could not conceal a devastating election for unionism’s biggest party.

Its record on Brexit and other missteps left it squeezed between moderate and hardline rivals.

In an astonishing reversal in North Antrim, Paisley, the son and namesake of the DUP’s late founder, came second to Jim Allister of the TUV, who blamed the DUP for post-Brexit checks on goods coming from Great Britain, which he said weakened Northern Ireland’s place in the UK.