A new "fixit" law to allow police to legally store the fingerprints and other identifying details of youth offenders has been passed by Parliament.

The Policing (Storage of Youth Particulars) Amendment Bill passed its third reading, 106-13, this afternoon.

Police Minister Judith Collins introduced the legislation to close a legal loophole. A drafting error in a bill drawn up in 2008 meant police were illegally storing fingerprints and photographs of young people who had come before the Youth Court.

A secret deal was struck with the Labour party to progress the legislation under urgency and the details of the bill were only made public this morning. It passed through all its stages today and did not come before a select committee for public submissions. The Green and Maori parties objected.

Collins said young offenders could potentially have challenged a conviction if it was based on improperly retained evidence. The law applies retrospectively to prevent any appeals.

"The legal position was not intended to be altered by the Policing Act 2008," she said. "If this unintended situation is not remedied, police will continue to be unable to retain the identifying particulars for these young offenders. And, any future re-offending by the same people will be more difficult to detect.''

Current legislation allows police to store about 50 sets of identifying particulars of young offenders per year. The new law will allow police to retain about 1200 sets.

Police learned of the loophole last year and destroyed around 5,500 items which were illegally retained.

Green MP Keith Locke said introducing the bill under urgency and surrounded in secrecy reinforced this Parliament's reputation as being "the fastest legislator in the west".

The Greens were given an advance copy of the bill last night, and MPs were given no time to do any research, he said. He was not able to obtain a copy of the regulatory impact statement.

Locke said MPs were unaware if the Attorney-General had assessed whether the legislation complied with the Bill of Rights. "And the public are totally shut out of this process.

"What better way to make another mistake than to rush a bill through in a couple of hours without any real consideration of this Parliament let alone a select committee.

"It is unethical to proceed in this manner."

Maori MP Rahui Katene told Parliament the bill concerned "our most vulnerable citizens". It raised the question of discriminatory ethnic profiling, she said.

"For many of our community, it is an issue that they have unfortunately associated with too many policing decisions in relation to apprehension of our young people - and it must be an issue that we give serious consideration to in this debate."

And she said police would be able to retain the fingerprints and photographs of young people who have been discharged without conviction or admonished.

Katene also questioned the secrecy around the bill, calling on Collins to explain why the name of the Bill was not published until this morning.