Stormont MLAs have agreed to move Northern Ireland's first ever climate bill to the next stage.
They voted 58 to 29 in favour after more than six hours of debate, meaning the proposed legislation will proceed to detailed scrutiny at the assembly.
The bill sets a 2045 net zero greenhouse gas emissions target for Northern Ireland.
It establishes a legal framework including five-year plans for emissions cuts.
It does not specify the level of reductions required in various sectors like agriculture, transport and energy.
Those would come later, be set by Executive departments and require assembly approval.
The bill would also create the role of Climate Commissioner to oversee progress against those targets.
It is opposed by farmers, Agriculture minister Edwin Poots and his DUP party.
Mr Poots told MLAs it would be "extremely detrimental to our economy".
As the sector which emits most greenhouse gases, the farming sector fears it will be disproportionately affected.
Bill sponsor Clare Bailey said there was nothing in it which "harms farming".
She said the goal was to see farms of all sizes thrive, not see the industry continue to contract and consolidate.
The minister is drawing up his own legislation which draws on a recommendation from an advisory body to government on climate.
The Climate Change Committee said it suggested a reduction of at least 82% in emissions by 2050 given Northern Ireland's economic reliance on agriculture.
It said that would be a fair contribution to a wider UK net zero target.
Mr Poots claimed his policy proposals were being held up by Sinn Féin at the Executive.
Sinn Féin, Alliance, the SDLP, the Green Party, Ulster Unionists, and several independents back the bill.
The DUP and Jim Allister of the TUV oppose it.
Ulster Unionist Roy Beggs said he could not support the bill but would back one reflecting the recommendations of the Climate Change Committee.