German energy provider RWE on Thursday announced a surprise loss of 5.7 billion euros ($6 billion) for 2016, hit by writedowns on its plants and one-off costs related to the countrys exit from nuclear power.

"The difficult market environment made impairments necessary. In addition, the nuclear energy fund imposed a substantial one-off burden on us," chief executive Rolf Martin Schmitz said in a statement.

RWE said it was forced to recognise impairments of 4.3 billion euros last year, mainly on its unprofitable German power plants although the company also wrote down the value of assets in Britain, the Netherlands and Turkey.

Like most big European energy companies, RWE is battling low wholesale electricity prices and competition from heavily-subsidised renewable energy rivals.

The group's performance was also dented by what it described as an "additional extraordinary burden" in the shape of new German legislation that forces energy firms to help pay for the country's nuclear phase-out.

The German government decided to move away from nuclear power in the wake of the 2011 Fukushima disaster.

Under a draft law approved in October, the firms Vattenfall, EON, RWE and EnBW would have to contribute 23.5 billion euros to a state fund for the storage of nuclear waste by 2022.

RWE said it will have to contribute about 6.8 billion euros to the fund.

Of that amount, 1.8 billion euros was set aside as nuclear provisions in its 2016 results.

The group said it would not be paying any dividends for 2016.

"The new regulations governing nuclear waste disposal are sensible, but require a great financial effort from RWE," chief financial officer Markus Krebber said in a statement.

"We do not see any room for paying a dividend on common shares for fiscal 2016," he added.

The group will present its full-year results on March 14.