Anti-fracking campaigners have claimed that a decision to allow energy companies to drill for shale gas in Yorkshire could be challenged in court.

The fracking firm Third Energy was given permission last month to carry out test drilling at a site in Kirby Misperton in Rydale, North Yorkshire, even after locals opposed the application.

Friends of the Earth and a local campaign group, Frack Free Ryedale, have written to North Yorkshire county council claiming the decision could be illegal. They have warned their letter could be followed by an application to the courts to have the decision overturned.

After a two-day meeting at the county hall in Northallerton, councillors voted by a majority of seven to four to approve the fracking operation near Pickering. The move was hailed by the government and the fracking industry as a “fantastic opportunity”.

The decision, which will allow fracking in the UK for the first time in five years, was made despite thousands of objections from residents and campaigners.

The approval prompted fears around the country that other fracking sites would be given the green light. Those fears are particularly acute in Lancashire, seen as the next frontier in the fight against the extreme form of energy extraction.

In a letter sent to the Yorkshire authority this week, the campaigners argue that the authority did not put enough weight on the potential impact on global warming of burning the gas extracted at Kirby Misperton.

Friends of the Earth’s legal adviser Jake White said: “Communities have no right of appeal against fracking decisions, only developers do. Friends of the Earth and local people can’t appeal to get the councillors’ decision overturned.

“Given that we have legitimate legal concerns, it is only right that the court may be called upon to decide them. Because the decision appears to have been arrived at without properly considering climate change, we believe it to be unlawful.”

Fracking was halted on the Fylde coast in 2011 when tests found it was probably the cause of minor earthquakes in the area. Since then two high-profile applications to frack in Lancashire have been rejected by councillors and are the subject of appeals.

Planners had recommended the most recent application be approved, despite acknowledging that the majority of representations received in consultation were objections.

Of 4,420 individual representations, 4,375 were objections and 36 were in support of the application to frack for shale gas at the firm’s existing well in Kirby Misperton, known as KM8.

The government has said it is going “all-out for shale” to boost energy security and the economy. But opponents fear fracking – in which liquid is pumped deep underground at high pressure to fracture rock and release gas – can cause problems including water contamination, earthquakes, and noise and traffic pollution. Environmentalists also say pursuing new sources of gas, a fossil fuel, is not compatible with efforts to tackle climate change.

Simon Bowens, Friends of the Earth’s Yorkshire campaigner, said: “A mere six months after the Paris climate change agreement, North Yorkshire county council decided to support a dirty, dangerous, fossil fuel industry.

“They side-stepped the wishes of the people they represent, the powerful testimonies presented to them over two days, and their legal duties to reduce greenhouse gas emissions. This was undemocratic, reckless, and Friends of the Earth believes it could be unlawful as well.”