Media playback is unsupported on your device Media caption Ed Miliband: ''We've got to tackle the cost-of-living crisis''

Ed Miliband would "take action" against energy companies if they defied a Labour government by raising prices ahead of his promised freeze.

The Labour leader has pledged gas and electricity bills would not go up for 20 months if he wins the 2015 election.

It has been welcomed by consumer groups angry at price hikes over recent years, but the "big six" suppliers warned it could have serious consequences.

Energy Secretary Ed Davey, a Lib Dem, said it risked "the lights going out".

Mr Miliband told the BBC the UK had "a market that isn't working" and, as the row between Labour and the energy firms escalated, he dismissed them as "unreliable witnesses" after they claimed possible blackouts.

He has written to the big six suppliers warning that without changes, taxpayer-funded guarantees to energy firms might not be sustainable.

The plan for a freeze on household and business energy bills between June 2015 and the start of 2017 was the stand-out announcement of Mr Miliband's party conference speech on Tuesday.

'Overcharging'

The Labour leader argued firms had been "overcharging" customers for many years and millions of households would benefit from the temporary cap on prices at a time when finances were under acute pressure and many were struggling to heat their homes.

Labour says the move will save average households £120 a year and businesses £1,800.

Media playback is unsupported on your device Media caption When the lights went out - the BBC reports on California's energy blackouts in 2001

Mr Miliband insisted he wanted energy suppliers to be successful and to continue to invest in new capacity to supply the UK's long-term energy needs.

But he said "public consent" for these arrangements depended on consumers getting a fair deal and that could happen only if the energy market was totally restructured to separate firms' generating and retail operations.

'Patently absurd'

Speaking to BBC News he said: "I've written a letter to [the energy companies] this morning saying there's a crisis of confidence in the system.

Cheaper energy bills Advice from the Energy Saving Trust: Insulate your hot water cylinder. Could save up to £60 a year

Get an eco-shower head. Some water companies are giving them away free; could save you up to £75 a year

Swap halogen spot lights with new LED bulbs. Replacing all traditional bulbs with energy saving versions can save £60 a year Make more energy savings

"It's time we fixed it and they can either choose to be part of the problem or part of the solution. I hope they choose to be part of the solution."

Rebutting claims that to protect their profits, suppliers would merely put their prices up ahead of Labour's freeze, Mr Miliband said he would "make sure this is a genuine freeze that works for consumers".

"If we have to take action to make sure that happens, we absolutely will."

The party has rejected suggestions the cap, which could cost energy firms £4.5bn, will endanger much-needed investment in new plants, saying suppliers should be able to absorb the cost of the freeze out of recent profits.

Responding to suggestions the policy could lead to energy blackouts, Mr Miliband accused the industry of spreading "scare stories".

Shadow business secretary Chuka Umunna added the claims were "patently absurd" and "nonsense" put about by the large energy companies.

Since 2007, gas bills have risen by an average of 41% in real terms, while electricity has gone up by 20%, according to the Office for National Statistics.

This has contributed to overall industry profits of £2.15bn in 2009, £2.22bn in 2010, £3.87bn in 2011 and £3.74bn in 2012.

But suppliers say prices have gone up to cover their rising environmental and social obligations and in response to commodity price rises - sums paid on wholesale markets.

Speaking at a fringe meeting on Tuesday evening, a senior British Gas executive suggested such a direct price intervention could "threaten energy security in the UK".

"If we have no ability to control what we did with the retail prices, and that (wholesale price volatility) was to happen again, it would mean we are selling products at significant amounts of a loss and that would threaten energy security in the UK," said Ian Peters.

Asked whether it could mean "the lights could go off" he replied: "I think that is a risk."

'Economic ruin'

Energy UK, the trade body representing the six largest energy firms, has described the price freeze as "superficially attractive" but suggested it could bring a halt to future infrastructure projects.

Chief executive Angela Knight said: "It will also freeze the money to build and renew power stations, freeze the jobs and livelihoods of the 600,000-plus people dependent on the energy industry and make the prospect of energy shortages a reality, pushing up the prices for everyone."

Media playback is unsupported on your device Media caption Centrica's boss warns that the plan could lead to firms' "economic ruin"

And the chairman of Centrica - British Gas's holding company - said a firm unable to control either its costs or its prices was potentially in danger of "economic ruin".

"We are all concerned about rising prices and the impact on consumers, but we also have a very real responsibility that we find supplies to make sure the lights stay on," Sir Roger Carr said.

Energy Secretary Ed Davey said: "Fixing prices in this way risks blackouts, jeopardises jobs and puts investment in clean, green technology in doubt.

"Ed Miliband made a significant contribution to tackling climate change with the 2008 Climate Change Act. But he is putting this all at risk with his ill thought through plan which will put off investors in low carbon power generation."

Asked on BBC Radio 4's Today programme whether a Labour government would step in if a firm went bust, Mr Miliband said: "That's not going to happen."

But he added: "Of course if there was a major shock, companies could make their case."

Energy regulator Ofgem, which Labour plans to replace after 2015, has suggested legislation would need to be passed to change pricing arrangements.

In his speech, Mr Miliband also promised Labour would build 200,000 new homes a year by 2020 and enfranchise 16 and 17 year olds.