Grid operator Svenska Kraftnat said the plant in Malmo in the south of Sweden must be part of the country's power reserve by 2025, having been idle since 2016. The plant was mainly running on gas when it was closed, and can also burn oil.

"The background is the deteriorating security situation in Sweden's immediate area and that Malmo, which is Sweden's third-largest city, must have a local electricity supply in the event of a crisis or war," Svenska Kraftnat said in a statement.

"It's of the utmost importance that Malmo has reserve power options that can supply functions important to society with electricity ... if the national or regional electricity supply is cut off," it said.

Sweden is striving to join the NATO military alliance in the wake of Russia's invasion of Ukraine, but has so far been blocked by alliance member Turkey.

Svenska Kraftnat's decision means Uniper's Swedish unit Sydkraft will back out of an agreement reached in 2021 to sell the plant to Dutch company PACO Holding, which had been planning to dismantle and move it outside Europe.

A spokesperson for Uniper in Sweden said the German group was complying with the grid operator's order, adding the sale of the power plant had been stopped as a result.

Svenska Kraftnat said it would reimburse Uniper a maximum of 1.11 billion Swedish crowns ($109.3 million) for firing up the plant, which has a capacity of 448 megawatts, and maintaining it as a power backup for five years.

($1 = 10.1526 Swedish crowns)

(Reporting by Anna Ringstrom Additional reporting by Christoph Steitz in Frankfurt; Editing by Mark Potter)