The Dairy Industry Restructuring Act, or DIRA Bill, has narrowly passed its first reading at Parliament, 63 votes to 57.
The changes proposed by the government follow a lengthy review of 18 year-old-rules governing Fonterra and the farmers that supply it.
Fonterra was given near monopoly status after dairy industry restructuring in 2001. The DIRA was put in place to regulate Fonterra, with the aim of protecting the long-term interests of farmers, consumers and the wider economy.
Agriculture Minister Damien O'Connor told Parliament the industry had changed considerably since 2001.
Fonterra's market share had fallen from 96 per cent to about 80 per cent, and legislation needed to be updated to reflect that, he said.
"Moving into that different situation it is important that Fonterra are not exposed to all the risks and that its competitors pick up all the opportunities," Mr O'Connor said.
He said the changes would give Fonterra increased rights to refuse milk from farmers who do not meet required standards on the environment, employment conditions or animal welfare.
There would also be a relaxed, but not removed, obligation by Fonterra to supply milk to its rivals.
The National Party opposed the bill at its first reading. Its agriculture spokesperson, Todd Muller, said the bill did not go far enough in reducing aspects of Fonterra's regulatory burden.
Mr Muller said the company should have the ability to treat returning suppliers on different commercial grounds than those who had stayed with the co-operative.
He added that National was also opposed to Fonterra having to continue to support scale competitors with start-up milk supply.
"National supports rural New Zealand and knows the importance of the dairy industry to our country. We want legislation that will help it succeed on the world stage not constrain it," Mr Muller said.
The bill would now go before a select committee, which would give industry stakeholders a change to have their say.