LONDON (Reuters) - A local authority should have considered the long-term climate impact of onshore oil wells when it granted them planning permission, the UK Supreme Court ruled on Thursday in a decision that could hugely impact any future fossil fuel developments.

Environmental campaigners had argued that planning permission for the retention and expansion of an oil well site in southern England was flawed because it had only considered the direct effect of the development, and not the impact of greenhouse gas emissions from the use of the extracted oil.

Judges on the UK's top court agreed by a narrow three to two majority, saying the planning approval was unlawful because the later emissions should have been considered in an Environmental Impact Assessment (EIA).

"It is not disputed that these emissions, which can easily be quantified, will have a significant impact on climate," said George Leggatt, one of the three Supreme Court justices who agreed with the appeal.

"The only issue is whether the combustion emissions are effects of the project at all. It seems to me plain that they are."

Ahead of the ruling, campaigners said, if they won, the landmark judgment would make it much harder for new oil, gas and coal developments to get approval, and other controversial schemes would be impacted.

"It is extremely difficult to overstate the significance of this case," said Sam Fowles, planning and environment law specialist at Cornerstone Barristers. "(It) could be the beginning of the end of new fossil fuel extraction in the UK."

In 2019, Surrey County Council gave permission for Horse Hill Developments, part owned by British energy company UK Oil & Gas Plc, to retain two oil wells and drill four more over more than 20 years near the town of Horley, close to London's Gatwick Airport.

An EIA for the project examined the effect of the construction, production and decommissioning of the site but did not assess the downstream impact from emissions that would result from the use of the oil when it was later refined and used, for example as fuel.

The Weald Action Group (WAG), an umbrella organisation for local groups that campaign against the extraction of oil and gas in southeast England, estimated this would equate to more than 10 million tonnes of carbon emissions.

A campaigner acting for WAG launched a legal challenge against the planning approval, but this was rejected both by the High Court in London and then by the Court of Appeal which ruled had the council had not acted unlawfully and that it was for government to decide on the making of policy.

"In my view, there was no basis on which the council could reasonably decide it was unnecessary to assess the combustion emissions," Leggatt said in his Supreme Court judgment.

(Reporting by Michael Holden; editing by William James)

By Michael Holden