The race for the final upper house seat in the NSW Parliament remains close, leaving open an outside possibility of a legal challenge which could result in a re-run of the upper house election and a virtual referendum on the partial privatisation of the state's electricity assets.

On current numbers, the No Land Tax Party looks likely to take the 21st and final upper house spot away from its closest contenders – the Liberal Party and the Animal Justice Party.

If the count is close, the Animal Justice Party may launch a legal challenge due to a ballot paper error. Credit:Chris Hopkins

However, an error in the NSW Electoral Commission's electronic ballot paper which left the Animal Justice Party without an above the line square for the first two days of voting meant it missed out on an estimated 660 to 1000 votes. If it loses the contest for the final upper house seat by a margin of less than 1000 votes, it may have a case for contesting the result in the Supreme Court. This could have the potential to result in a re-run of the upper house election.

ABC election analyst Antony Green said the Animal Justice Party needs the gap to be under 1000 votes at most to have a strong case for contesting the election result.