Controversy over fracking has been reignited after a surprise announcement that a future Labour government would ban it.

Shadow minister Barry Gardiner won loud applause at Labour's annual conference in Liverpool when he attacked the Government's policy on promoting shale gas.

His pledge to ban fracking was welcomed by environmental campaigners but was described as "madness" by the GMB union.

Gary Smith, the union's Scotland Secretary, told the Press Association that the UK will be dependent on gas for decades, adding: "We will have to confront the fact that we will be buying gas from hangmen, henchmen and head-choppers. We don't think that's ethical. "

Mr Gardiner, shadow international trade secretary, said former chancellor George Osborne passed "the most generous tax regime for shale gas anywhere in the world".

He continued: "Well that will change under Labour.

"There are technical problems with fracking, and they give rise to real environmental dangers. But technical problems can be overcome. So on their own they're not a good enough reason to ban fracking.

"The real reason to ban fracking is that it locks us into an energy infrastructure that is based on fossil fuels long after our country needs to have moved to clean energy.

"So today I am announcing that a future Labour government will ban fracking.

"We will consult with our colleagues in industry and the trade unions about the best way to transition our energy industry to create the vital jobs and apprenticeships we are going to need for the UK's low-carbon future."

Caroline Lucas, co-leader of the Green Party, said: "Labour's commitment to a fracking ban is extremely welcome.

"Not only does fracking pose risks to local communities, but drilling for gas under our countryside risks undermining our climate change commitments too.

"It's now down to every Labour politician, from local councillors, to assembly members and MPs, to oppose any plans for fracking in their areas."

Hannah Martin, energy campaigner at Greenpeace UK, said: "It's encouraging to see some politicians have noticed that the energy industry is undergoing some changes.

"With opposition to fracking an all-time high across the country, this ban on an unproven and inexperienced industry will be widely welcomed.

"But the really forward-looking part of this announcement is the democratisation of energy.

"Support for community energy schemes can empower the people of Britain to take back control from the stranglehold of the Big Six, and choose cleaner and increasingly cheaper energy than the fracked gas and nuclear reactors being pushed by the Government."

Ken Cronin, chief executive of UKOOG, the onshore oil and gas trade body, said: "We import over 50% of our gas usage today and that is set to rise to 80% while at the same time 84% of our homes use gas for heating, 61% for cooking, up to 50% of our electricity comes from gas and a large number of everyday products use gas as an integral feedstock.

"Imports of gas as LNG (liquefied natural gas) are 15% more carbon intensive than locally produced shale gas.

"If we want to maintain the right of the general public to access heat and power securely, manage climate change, create UK based jobs then we need to develop renewables, nuclear and natural gas from shale.

"To go for a narrow one size fits all approach will lead to more imports and a detrimental impact on the environment and economy."

Liberal Democrat energy and climate change spokeswoman Lynne Featherstone said: "Only a month ago, Labour said fracking could bring benefits. Now they are flip-flopping and opposing it.

"I hope these are not just empty words and they will join Liberal Democrats in actively opposing the Tory plans to ruin our countryside.

"There's no question that fracking must be banned; it's deeply unpopular in affected communities and will set us back from our climate change targets."