(Bloomberg) -- A German court ruled against the national government in a dispute over a refinery seized from Russian oil giant Rosneft PJSC, prolonging a legal battle over the plant’s ownership.  

The court determined that Alcmene GmbH’s acquisition of Shell Plc’s share in the PCK Schwedt refinery — a deal brokered in 2021 — was valid, Berlin’s Administrative Court ruled late Tuesday.

The government, which took control of the local Rosneft unit last year in the fallout of Russia’s invasion of Ukraine, hasn’t approved the sale.   

The Economy Ministry will examine the judgment “with due diligence and then decide whether to lodge an appeal,” a spokeswoman said. 

The dispute highlights the complex energy ties that existed between Russia and Germany before the war — and the legal difficulty in untangling them. Ownership of the Schwedt refinery in east Germany has been in limbo as the European Union tries to recover from last year’s energy crisis. 

Alcmene concluded its purchase agreement for Shell’s 37.5% stake in the east German plant more than two years ago. However, majority shareholder Rosneft also wanted the stake and exercised its right of first refusal, setting the stage for a protracted dispute. 

Germany’s antitrust regulator cleared the Alcmene deal last year, but final approval became complicated when the government took over Rosneft’s local unit. 

Alcmene welcomed the court’s ruling, saying in a statement Wednesday that the decision confirmed the company’s investment had been approved. Shell declined to comment, as it wasn’t part of the legal proceedings.

©2023 Bloomberg L.P.