Forced installation of pre-pay meters came under scrutiny last year after The Times newspaper reported that debt agents working on behalf of Centrica's British Gas had forcibly installed such meters in the homes of some vulnerable customers.

Ofgem responded with a temporary ban on the practice while it developed a new code of practice. Prepayment meters can lead to customers' supplies being cut off if the meters are not topped up.

EDF, Octopus and Iberdrola's Scottish Power, three of the country's largest energy suppliers have now met the conditions of the code, Ofgem said.

Under the code, the companies have carried out internal audits and committed to reinstating non-prepayment methods and offering compensation to homes where pre-pay meters should not have been installed.

They must also provide Ofgem with regular monitoring data on installations of pre-pay meters.

Ofgem said forced installation should be the last resort of an energy supplier but that households should not be able to build up unsustainable debts.

"Many households value the control that these pay as you go meters offer over bills and how they can help with budgeting, and suppliers must also be able to recover debt to make sure those costs don't end up on everyone else's bills," Tim Jarvis, Ofgem's director general for markets, said in a statement.

Pre-pay meters cannot be forcibly installed in the homes of vulnerable people such as those aged over 75 nor in the homes with children under two years old.

Households that have residents with severe health issues or who need to keep warm for medical reasons will also be protected.

(Reporting by Susanna Twidale; Editing by David Goodman)