In a world first, the Danish government has announced an agreement to introduce a tax of €40 per tonne of CO2 emitted by livestock in 2030, rising to €100 per tonne in 2035.
The agreement - reached after extensive talks between farmers, unions and environmental groups - will now go to parliament where it is expected to be approved.
Farmers will be allowed a 60% tax rebate on the charge and the government has promised substantial subsidies to help farmers adjust their operations.
The Danish government has sought to reduce agricultural emissions to meet the country's goal of reducing emissions to 70% of the 1990 level and to make the country net-zero by 2050. Research suggests that farming accounts for around a third of the country's emissions.
No derogation
Denmark has already said that it will not seek another derogation from the nitrates directive.
Farmers' unions had previously expressed concerns that the introduction of such a tax would force them to reduce production and close farms. A government report suggested that the measure would cut cattle and pig numbers by up to 20%.
There was a cautious welcome to some of the measures included in the agreement to help farmers transition their businesses and for the certainty given by the conclusion of the talks.
Earlier this month, New Zealand scrapped plans to tax farm CO2 emissions, with the centre-right coalition there saying they would explore other ways to reduce methane output.