Three crossbench MPs have sided with Queensland’s Labor government on new laws to keep 17-year-old offenders out of adult prisons.

The laws, passed on Thursday night and to be phased in over 12 months, will bring Queensland in line with other states and territories.

The independent MPs Rob Pyne and Billy Gordon voted with the government.

But the issue split parliament’s two Katter party MPs – leader Rob Katter voted yes while Shane Knuth went with the LNP opposition to oppose the change.

The attorney general Yvette D’Ath told parliament the laws would enshrine a change that was long overdue.

“People who cannot vote, cannot purchase alcohol and cannot be sued because they are not adults should not be treated as adults in the justice system. It just does not make sense,” she said.

Former Labor MP Gordon praised the Labor government for bringing Queensland in line with the UN Convention on the Rights of the Child.

“The government, with the essential support of my colleagues on the crossbench, and I look to restore a little more humanity and dignity to how we as a society look after our most vulnerable,” he told parliament.

But the opposition MP Dale Last warned of problems ahead as hardened 17-year-old criminals started to mix with younger offenders in youth detention.

“We are not talking about angels here; we are talking about young offenders who have committed the most serious of crimes,” he told parliament.

“And here we are today contemplating the transition of 17-year-olds into our youth detention centres to further poison the minds of these young offenders.”