Ed Miliband has attacked David Cameron for giving up the fight against climate change, warning that Britain is "sleepwalking into a national security crisis".

The Labour leader said the winter storms that have been wreaking havoc in the country should serve as a "wake up call".

It was "extraordinary" that the Prime Minister was now portraying climate change merely as "a matter of conscience", when it had been a "core conviction" when he was in Opposition.

In an interview with The Observer, Mr Miliband said: "In 2012 we had the second wettest winter on record and this winter is a one in 250-year event. If you keep throwing the dice and you keep getting sixes then the dice are loaded. Something is going on...

"We have always warned that climate change threatens national security because of the consequences for destabilisation of entire regions of the world, mass migration of millions of people and conflict over water or food supplies.

"But the events of the last few weeks have shown this is a national security issue in our own country too with people's homes, businesses and livelihoods coming under attack from extreme weather. And we know this will happen more in the future."

Calling for the cross-party consensus on climate change to be rebuilt, Mr Miliband said: "The science is clear. The public know there is a problem. But, because of political division in Westminster, we are sleepwalking into a national security crisis on climate change. The terrible events of the last few weeks should serve as a wake-up call for us all.

The Labour leader said he had "genuinely believed" that Mr Cameron was sincere about his passion for green issues while in Opposition, but the sacking of Charles Hendry as energy minister and appointment of Owen Paterson - widely viewed as a climate change sceptic - as Environment Secretary suggested otherwise.

Recently the Tory leader said: "I think the point I would make is, whatever your view, clearly we have had and are having some pretty extreme weather. So whatever your view about climate change, it makes sense to mitigate it and act to deal with that weather."

Mr Miliband insisted such "ambivalence" could be disastrous for Britain.

"It is pretty extraordinary that it has gone from a core conviction, a part of his irreducible core, to a matter of conscience as to whether you believe it or not," he said.

"The reality is that the action we take as a country depends on whether you believe in climate change. If you believe that the climate has been changing for centuries - and that this is no different - then why would you believe that it is necessary to take all the measures that are required?

"What we have seen for the last couple of weeks is that that (attitude) has impacts.

"So when the Government downgrades flood protection, cuts the floods budgets, cuts the adaptation budget - all of those things - that has an impact."

He added: "The problem is that either denial or dither on climate change will damage the country.

"Denial is damaging because it means you won't take the steps necessary, but dither is damaging, too, because it means you are half-hearted about taking the necessary measures."