Prisoner Arthur Taylor, who campaigned for the right for inmates to vote.

A ban on prisoners voting has been ruled inconsistent with the Bill of Rights, in a declaration from the courts that is the first of its kind.

Prisoner Arthur Taylor is one of a group of five serving prisoners who argued that the Electoral (Disqualification of Sentenced Prisoners) Amendment Act 2010 was inconsistent with the New Zealand Bill of Rights Act 1990.

Under the amended act, all people in prison on election day are unable to vote.

Taylor lost a High Court bid in September last year which would have allowed him to vote in the general election.

On Friday, Justice Paul Heath formally declared the ban to be inconsistent with the New Zealand Bill of Rights Act, which all laws should be in line with.

The declaration from the High Court was the first of its kind. It sends a formal message to Parliament that the law it passed was indefensible as it limited individual rights without reasonable justification.

However, Heath's ruling does not necessarily mean the Government will change the law. It said it would consider the judgment.

Heath said the inconsistency arose in the "most fundamental aspect of a democracy...the right of all citizens to elect those who will govern on their behalf."

The attorney-general had also found the law was inconsistent with the Bill of Rights before it was introduced.

As it stood, the law had "arbitrary consequences" in that a low-level offender given a short prison sentence could not vote if incarcerated on election day, while a serious offender imprisoned for 2-1/2 years between elections could still vote, Heath said.

The courts still have to apply the law under the Bill of Rights Act, but the formal declaration from the High Court indicates it should not be in place.

The Green Party called for the Government to immediately introduce legislation lifting the ban on prisoners voting.

The party's justice spokesman David Clendon said National had passed "terrible law" which had been widely condemned.

Legislation needed to be brought before Parliament to undo the damage and make the law consistent with New Zealand's human rights obligations.

Labour's justice spokeswoman Jacinda Ardern said the ruling showed the law should never have been passed.

Parliament had a responsibility to respect fundamental rights for all, and the Government needed to see the unprecedented ruling as a "wake-up call", she said.

University of Otago law professor Andrew Geddis said the Government and Parliament should decide "whether or not they think the law is worth it."

"In the end, Parliament is sovereign and can do what it wants, so if Parliament wants to take a different view on this issue it can, but I think it really ought to re-examine this issue given the strength of the notice that has been given."

In practice, it would boil down to how embarrassed the Government would be about the issue, Geddis said.

"They've essentially been told they've made law that good nations like New Zealand shouldn't make - but do they care?"

At a deeper level, it was the first time the High Court had issued a formal declaration of inconsistency with the Bill of Rights Act, which was an "official notice" to Parliament that the law they had passed was "bad law," Geddis said.

A more tailored approach than the current blanket ban could be taken, with voting rights removed for certain crimes or as part of sentencing.

A spokesman for Justice Minister Amy Adams said Parliament had considered Bill of Rights implications when it passed the amendment in 2010.

"At this stage we're still considering the judgment but it's worth noting that, as the judge has stated, the finding that a piece of legislation breached the Bill of Rights Act does not invalidate the legislation."