* Price cap to run initially until 2020
* Regulator Ofgem left to work out detail
* Centre-right government acts to modify market (Updates after publication of draft bill)
By William James and Kate Holton
LONDON, Oct 12 (Reuters) - The British government put some flesh on its plans to cap consumer gas and electricity prices for millions of households, ordering the industry regulator on Thursday to come up with curbs that will initially last until 2020.
Prime Minister Theresa May first proposed a price cap on the energy sector earlier this year, the biggest market intervention since its privatisation almost 30 years ago. She said her centre-right government was trying to fix a market that punishes customers for their loyalty to a supplier.
Her announcement last week that the plan would go ahead initially wiped more than 900 million pounds ($1.2 billion) off the value of the two British listed companies Centrica and SSE alone.
"I have been clear that our broken energy market has to change – it has to offer fairer prices for millions of loyal customers who have been paying hundreds of pounds too much," May said on Thursday.
The draft bill published on Thursday said the price cap would initially last until 2020, with the potential to be extended by up to three years if needed.
But, it gave no precise detail for businesses keen to see how much it would cost them, other than to say it would be an absolute price cap, as opposed to a relative one based on the difference between the cheapest and most expensive tariff. Ofgem will set the terms.
Britain's energy market is dominated by the so-called big six providers -- Centrica's British Gas, SSE, Iberdrola's Scottish Power, Innogy's npower, E.ON and EDF Energy, which account for about 85 percent of the retail electricity market.
Shares in SSE added 1.5 percent by 1215 GMT on Thursday, while Centrica was up by 0.4 percent.
Energy bills have doubled in Britain over the past decade to an average of about 1,200 pounds ($1,500) a year, putting the biggest providers in the sights of politicians.
More than 18 million customer accounts in Britain are currently on a standard variable tariff (SVT) or other default tariffs. Many of these offer poor value to customers because they are priced higher than the fixed-rate deals available to consumers who actively seek them out.
"This draft bill ... requires Ofgem to modify the standard licence conditions for gas and electricity suppliers, so as to include conditions that impose a price cap for standard variable tariffs and default tariffs offered to domestic customers," explanatory notes accompanying the legislation said.
It set out exceptions covering tariffs already benefiting from protection and tariffs with environmental benefits.
"Ofgem will work alongside Government to provide price protection to all standard tariff customers as soon as possible, if legislation is passed," an Ofgem spokeswoman said.
The cap is seen as a way to appeal to those voters who, after seven years of public spending cuts, are struggling with rising inflation and weak wage growth.
The leftist opposition Labour Party, which has long advocated intervention in energy markets, performed better than expected at a June snap election, depriving May of an outright majority in parliament.
The government said it wanted to go further that plans announced on Wednesday by Ofgem to extend an existing price cap which applies only to vulnerable consumers.
Ofgem said on Wednesday that whatever was contained in the upcoming legislation, the government's price cap would not come into effect for the upcoming winter. ($1 = 0.7561 pounds) (Additional reporting by Susanna Twidale; Editing by Keith Weir)