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 country's 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 recognise impairments of 4.3 billion euros last year, as well as set aside provisions to contribute to a government-ordered fund for the storage of nuclear waste by 2022.