Conservationists have criticised councillors for giving the green light to remove millions of cubic metres of peat for compost from Midlothian.
The Scottish Wildlife Trust said it was "incredibly disappointing" peat extraction had been given the go-ahead at Auchencorth Moss, near Penicuik, over the next two decades.
The trust said peatlands were important carbon stores and wildlife habitats.
It said they could also play an important part in reducing flood risk.
The decision was taken by Midlothian Council.
Dr Maggie Keegan, Scottish Wildlife Trust's head of policy, said: "It's incredibly disappointing that the destruction of peat bogs continues to be permitted while millions of pounds are being spent on their restoration elsewhere as part of Scotland's commitment to reducing carbon emissions.
"While we accept the moss has suffered damage in the past we believe it is possible to restore it to become an active bog that is rich in wildlife and acts as a carbon sink, helping Scotland meet its obligations to fight climate change."
She said lowland raised bogs were among the rarest and most threatened habitats in Europe and took thousands of years to form.
"Auchencorth Moss accounts for one-fifth of Scotland's total carbon emissions from peat extraction so refusing this application would have gone a long way to reducing the environmental impact coming from this sector," she added.
"Approving this application also goes against national and local policies that are aimed at phasing out the extraction of peat for use in horticulture.
"Peat-free composts have been available for many years so there is absolutely no need for this archaic practice to continue."
The Scottish government has set a target to restore 250,000 hectares of peatland by 2030.
A Midlothian spokesman said: "Peat extraction at Auchencorth Moss in Midlothian was granted planning permission in 1986.
"This planning permission expires in February 2042.
"The recent application was to review the conditions attached to the original planning consent.
"However this review process places restrictions on the local planning authority and as a consequence it cannot restrict working rights such as to prejudice adversely to an unacceptable degree either the economic viability of the operation of the site or the asset value of the site.
"If it did so the council would be liable to pay compensation for loss of income.
"Midlothian Council has managed to secure the restoration of the site to a raised bog rather than to agricultural land as stated in the original planning permission.
"Furthermore, the applicant is also required to provide financial provision to secure the decommissioning, restoration and aftercare of the site."