Legislation to allow Fonterra to introduce its trading among farmers plan passed its third and final reading in Parliament on Tuesday afternoon.
The Dairy Industry Restructuring Amendment Bill sets up the regulations for farmers to buy and sell shares amongst themselves, and was passed by 64 votes to 57.
Primary Industries Minister David Carter told Parliament the bill is crucial to ongoing growth of the country's dairy sector.
He says it also enables Fonterra to set up a shareholders' fund to allow farmers to sell the dividend rights of shares to outside investors.
But Labour's primary industries spokesperson Damien O'Connor says the changes create the environment for Fonterra to be publicly listed.
He says there should have been a legislated limit on the amount of outside investment in the shareholders' fund.
Mr Carter says the new legislation will also put the process Fonterra uses to set the farmgate milk price under greater scrutiny, by requiring it to be monitored by the Commerce Commission.