SNP energy minister Fergus Ewing was on the brink of resigning after being told to announce a moratorium on fracking, one of Holyrood's most high-profile MSPs has claimed.

Patrick Harvie, the Green co-convenor, made the allegation at a Scottish Energy Association conference on fracking and said it illustrated the internal war being waged over the issue within the country's dominant political party.

His remarks were dismissed by the Scottish Government, with a spokesman describing the claim as "categorically untrue".

It comes shortly after a grassroots group was set up within the SNP calling for the leadership to adopt a far tougher stance against unconventional oil and gas developments and ahead of a potentially divisive debate at the party's upcoming conference.

Mr Harvie, who has been an MSP for more than a decade and played a leading role in the Yes campaign before the independence referendum, was responding to a question over whether the Scottish Government would be more inclined to drop its moratorium if John Swinney's call to assign tax revenues from fracking to Holyrood was accepted.

He said: "Given that I've heard from a source I regard as reliable that the energy minister was on the point of resigning when he was told that he had to announce the moratorium anyway, and given that a number of members of his political party have just launched a group within the SNP to campaign for a much clearer, unequivocal opposition to unconventional gas, I think it would be silly to ignore the fact that the SNP has a very, very wide range of views on this.

"The way this issue plays out within the SNP will be a matter for them. It may come down to a tension between those with what I would regard as a fairly unreconstructed, right wing economic mindset and those who want to assert some democracy within the party. It may come down to which side of those wins the debate."

The SNP's Westminster energy spokesman, the Aberdeen South MP Callum McCaig, also alluded to a split within his party in response to questions from delegates.

He said: "There is a broad church in the SNP on this... there are a huge number of my colleagues who are not in favour of fracking, there are a fair number who are in favour and there are quite a large number who are there to be persuaded."

The Scottish Government also came under fire from leading industry figures over its moratorium, which Mr Ewing, who is seen as being on the right of the party, announced in January. It will remain in place until further research and a public consultation is carried out.

Ewan MacLeod, a specialist in planning law, said that the moratorium was of "questionable benefit" and that it may breach the European Convention on Human Rights, which states that planning and environmental applications should be dealt with within a reasonable period of time. He added: "Whilst taking decisions can be difficult, sitting on the fence can be dangerous."

Dr Stuart Paton, a geologist and chairman of natural resources firm Getech Plc, said there was already ample evidence to show that fracking could be carried out safely and accused the Government of using the moratorium to "kick the can down the road" until after the Holyrood elections.

He said: "Fergus Ewing is probably a sensible enough person that he knows where he’s going to get to, after the Holyrood elections. At some stage politicians also need to step up and do the right thing... and show leadership."

In response to Mr Harvie's allegation about Mr Ewing, a Scottish Government spokesman said: “This is categorically untrue. All Scottish Government ministers believe a moratorium is the right way forward until sufficient evidence can be gathered to allow an evidence-based decision to be made.”