MPs have voted down a bill banning the use of sow crates in New Zealand and other farming practices considered cruel.
The bill, sponsored by Green MP Sue Kedgley, was rejected by 62 votes to 57, with National and ACT the only parties to oppose it.
During the debate in Parliament on Wednesday night Green MPs appealed to National and ACT MPs to vote on behalf of the thousands of animals they say are suffering needlessly.
National MPs said while there is some sympathy for the bill, they would not be supporting it.
Some made arguments that sow crates are needed to protect pigs from themselves; others referred to problems with the wording of the bill.
Ms Kedgley says the bill's defeat is hugely disappointing and is due to Government MPs bowing to pressure from the farming lobby.