National and Act have agreed to pass a three-strikes law under which some killers will be locked away in prison without any chance of release.

Once an offender is convicted of a third serious offence, the judge will have to impose the maximum sentence for the crime.

For murder and manslaughter, the maximum is life imprisonment.

For sexual violation it is 20 years and for aggravated robbery, kidnapping and attempted murder it will be 14 years.

No prisoner convicted of a serious offence will be eligible for parole - early release under monitored conditions - if the conviction is for a second or third offence.

Labour says the move is a gimmick that falls well short of what National was promising before the last election.

The Maori Party says it is populist and that "judicial discretion is overruled by political dogma".

Act has taken a large amount of the credit for the law, having campaigned heavily last election on a "three strikes and you're out for 25 years" policy.

Crimes committed before the law is passed will not be covered, so it may be about eight to 10 years before the first offender is sentenced under the three-strikes law.

Sensible Sentencing Trust spokesman Garth McVicar said it was "a huge coup" for everyday New Zealanders, although it was a watered down version of what he had wanted.

He had hoped the law would be retrospective so criminals' previous violence convictions were included in their "strikes" tally.

"As it is, they get a clean slate and they are able to start again. I don't think that's fair to New Zealanders."

Under the proposed a law, a 20-year-old sentenced next year to four years for robbery, would be eligible for parole after serving a third of the sentence.

If he committed another robbery and was sentenced to five years he would have to serve all five years in prison.

If he committed a third robbery and carried a baseball bat, making it an aggravated robbery, he would have to be sentenced to 14 years and would serve 14 years.

If the aggravated robbery resulted in a murder, he would spend the rest of his life behind bars.

No offender will be able to accumulate three strikes in one crime spree.

Corrections Minister Judith Collins said the new law would add 56 inmates to the prison population after five years, 142 after 10 years, and 288 after 20 years.

The figures are based on 1980 to 2008 figures.

Judges now have discretion to apply minimum non-parole sentences for murder.

The new law will remove that discretion in all but exceptional cases in which the judge believes that to sentence for the maximum period would be"manifestly unjust".

Such discretion is available now to judges when sentencing murders to life imprisonment.

It has been used only once since 2002, in the case of an elderly man who killed his wife then tried to take his own life.

The new measures will be introduced in the Sentencing and Parole Reform Bill, which has been with a select committee while National and Act negotiated an agreement.

Act had wanted a mandatory 25-year sentence on the third offence, but National said this would give a disproportionate punishment for some lesser crimes.

Before the compromise, National's liberal Justice Minister, Simon Power, wanted the "strikes" threshold to apply to offenders given five-year sentences.

Mrs Collins said the law "will be harsh - but only for the small number of people in our community who show continued disregard for the law and contempt for society."

Labour leader Phil Goff said the move was "a gimmick that will make no difference".

The estimates of increased prisoner numbers were nothing like the 572 National had cited in the election campaign, and nowhere near the 2500 that had resulted under Labour from changes to sentencing and parole laws and extra policing.