Earnings at Britain's energy firms are under political scrutiny, with Ofgem set to impose a price cap in time for winter following a government promise to tackle "rip-off" prices.

Britain's big energy suppliers are also facing competition from more than 60 smaller challenger firms, often offering cheaper prices.

Ofgem said the market share of the challenger companies had risen to 25 percent by June 2018, up from 20 percent a year earlier and up from just 1 percent around six years ago.

The lower customer numbers led aggregated domestic supply revenues at the big six companies to fall by 1 billion pounds ($1.3 billion) to 22 billion pounds in 2017, Ofgem said in its annual state of the market report.

Total domestic supply profits aggregated across the six companies, measured as earnings before interest and tax, fell for the first time since 2014, by 10 percent to 900 million pounds in 2017, the report said.

Profit margins from supplying energy at the big six companies – Centrica British Gas, SSE, Iberdrola Scottish Power, Innogy's npower, E.ON and EDF Energy - varied widely.

British Gas and SSE made the highest margins, at 8 and 7 percent respectively, while npower had the lowest at -5 percent.

E.ON’s margins were at 5 percent, Scottish Power at 0.5 percent, while EDF Energy recorded a positive margin for the first time since 2009 of 0.9 percent, the report said.

Ofgem said the big difference in margins was likely due to varying operating costs and the extent to which costs were passed onto customers.

The big six will soon be the big five after Britain's Competition and Markets Authority this week gave the go-ahead for a merger between SSE and npower.

The companies aim to complete the deal by the first quarter of next year at the latest, they said earlier this year.

($1 = 0.7588 pounds)

(Reporting by Susanna Twidale; Editing by Mark Potter)

By Susanna Twidale