The energy price cap will make a “real difference” to the 12 million people stuck on the most expensive tariffs, a consumer group has said.

Regulator Ofgem is set to be handed new statutory powers – dubbed a “nuclear deterrent” – to end inflated prices.

The Domestic Gas and Electricity (Tariff Cap) Bill will put in place a requirement on Ofgem to cap standard variable and default energy tariffs until at least 2020 to tackle the amount consumers have been overpaying the Big Six energy suppliers, which the Competition and Markets Authority has put at £1.4 billion a year.

The Bill enables the temporary price cap to remain in place until 2023 if conditions for effective market competition are not met.

The new legislation should be operating next winter after receiving parliamentary approval.

Prime Minister Theresa May said: “For far too long, older people, hard-working families and those on low incomes have been subject to rip-off energy tariffs. Our energy price cap will protect households from unfair price rises in time for this winter when people can feel the pinch more acutely.

“We know that the cost of living is still a challenge for some families and today marks an important step in helping people to keep more money in their pockets.”

Energy Secretary Greg Clark said: “This Bill, which delivers on our manifesto promise, is a necessary intervention to protect millions of energy customers who have been stuck on poor value deals and hit by unjustified price rises for far too long.

“Switching will always save people money, but that doesn’t mean that customers should be punished for their loyalty.”

Citizens Advice chief executive Gillian Guy said: “The energy price cap will make a real difference to people’s lives. Capping prices for the 12 million people stuck on standard variable tariffs will stop firms overcharging customers who don’t or can’t switch supplier.

“Loyal customers have paid over the odds for too long. The passage of this Bill should mean the cap is in place for winter, giving much-needed protection to households across Great Britain.

“While the cap is a significant step towards a better energy market for consumers, it is also important that price protections remain in place for vulnerable people once the cap is lifted.”

Alex Neill, Which? managing director of home products and services, said: “The game is now up for energy companies, they must not repeat past mistakes by using this cap as an excuse for their shoddy service and bad deals.

“Action will now need to be taken so that when the cap is eventually lifted this broken market is a thing of the past and all energy suppliers finally compete for customers by efficiently delivering better service and fair prices.”

However, comparison site MoneySuperMarket said its survey of 2,000 households last week found that just 21% of bill-payers believed the cap would save them money.

MoneySuperMarket energy spokesman Stephen Murray said: “What initial reduction in bills the cap will bring, if any, is anyone’s guess, but it’s becoming very clear that households who have waited for this help will still be paying amongst the highest bills in the UK, and let’s not forget the regulator will re-set the cap every six months so it can go up as well as down.”

Tory former minister John Penrose, who welcomed the Domestic Gas and Electricity (Tariff Cap) Bill’s departure from the Commons for Royal Assent, said he hoped the new powers would “never need be used”.

He said: “While we all hope that those powers are not needed, that the reforms which are designed to sharpen competition mean that they are never needed to be used, it will mean in future that they can be used and, with any luck, like a good nuclear deterrent, no-one will ever have to press the button, but my goodness me, they will know that they are there.”