Anti-fracking campaigners have lost their legal challenge to a decision to allow fracking to take place in North Yorkshire.
Third Energy was granted planning permission to extract shale gas at Kirby Misperton in Ryedale in May.
Friends of the Earth and residents had challenged North Yorkshire County Council's decision in the High Court.
Mrs Justice Lang ruled the council had acted lawfully. Campaigners said they were "devastated" by the decision.
Planners had voted 7-4 in favour of the application, despite more than 4,300 objections and only 36 representations of support.
It was the first fracking operation to be approved in England since a ban was lifted in 2012.
Campaigners had claimed in court the county council had not considered the impact on climate change and had not put provision in place for money to fund any remedial works.
Donna Hume, from Friends of the Earth, said: "The judge found that councillors had assessed the impacts of climate change.
"But we know that climate change was barely mentioned at that crucial council meeting where the decision to allow fracking was taken, and more damningly, that councillors did not have the information about the total carbon emissions produced from the fracking project."
The county council said it was "grateful" the judge had accepted it had given "proper regard" to the application before approval.
It added it had not sought to bring fracking to the county but had a duty to determine it and apply national and local policies.
Jackie Cray, a retired vicar, was one of the local residents who brought the case to court and vowed to continue to campaign against fracking.
She said: "We are devastated that this decision allows the government to continue to ignore the views of local people in this case.
"There is no support in North Yorkshire for this risky industry."
Third Energy intends to frack an existing well - KM 8 - to establish whether gas can be commercially extracted.
Chief executive Rasik Valand said: "The permission places a great obligation on Third Energy to prove that we can carry out the test fracks in the same safe, discreet and environmentally sensitive way that we have conducted our gas exploration and energy generation activities over the past two decades.
"We are confident that we will prove to the local community that their elected representatives were right to grant this permission."
The company has not indicated when it intends to begin fracking.