Prisoners serving a sentence of less than three years will now be able to vote in September's general election.
The prisoner voting Bill passed its third and final reading on Wednesday night, with support from Labour, New Zealand First and the Greens.
Almost 2000 prisoners now have that right, but it doesn't stop there.
In a chaotic night at Parliament, prisoners serving any sentence could be advised they can register with the Electoral Commission even though it's not legal for them to cast a vote.
Justice Minister Andrew Little said anyone serving a prison sentence of less than three years should have the right to vote.
"They will be out before the next election, it might be in a month, it might be in eighteen months, but they will be out before the next election and they must have a right to have a say on those running the country that they are about to be released free into."
The Green Party last night put forward two changes to the Bill, which were considered in Committee Stage under urgency.
The first, which would see all prisoners given the right to vote, failed to gain enough support.
But, in a bizarre twist, the National Party voted in favour of the second change which removes the Electoral Commission's power to stop disqualified voters from enrolling, a move which makes the Bill inconsistent.
National MPs were quick to point out the inconsistency during the Bill's third reading and Nick Smith tried to move the Bill back to the select committee stage, arguing it was a "shambles" and "unworkable."
ACT's David Seymour chimed in too.
"This is the biggest legislative screw up by this Government under urgency for about four weeks, since we accidentally passed the wrong law and unwittingly legislated a $2.5 billion business loan scheme because the Government couldn't put the right Bill on the table," Seymour said.
Little said the move was "mindless politics" from the Opposition.
Smith denied it was his party's support of the amendment that botched the Bill and instead pointed the finger at the Government.
"National did not agree with it. We voted for those provisions we supported, we voted against provisions we did not. It is the Government's responsibility to be able to have a coordinated position and them ending up with law that makes sense, we've ended up with law that is just a shambles," Smith said.
No one from the Green Party was available to speak to RNZ last night but a spokesperson said the party is waiting for advice on what the changes would actually mean for those in prison.
Regardless of the advice they receive, Little said the amendment will be corrected next week.
RNZ