WARSAW/BERLIN, Sept 16 (Reuters) - Polish refiner PKN Orlen is interested in taking a controlling stake in the PCK Schwedt refinery that Germany has placed under a trusteeship, effectively removing control from Russia's Rosneft, sources in Berlin and Warsaw familiar with the matter told Reuters on Friday.

Warsaw said earlier this year that ending Russian ownership of the refinery was a condition for potentially supplying the refinery with sea-borne oil via a terminal in Gdansk and via Polish pipelines to replace Russian crude.

State-controlled PKN Orlen and Poland's climate ministry were not immediately available for comment. The German economy ministry was also not available for comment.

The refinery, which was majority-owned by Rosneft, has been testing Germany's resolve to eliminate imports of oil from Russia by the end of the year under European sanctions to punish Moscow for its invasion of Ukraine.

Germany needs Polish support to supply the refinery via Gdansk. Schwedt also supplies parts of Poland.

The landlocked refinery is the source of 90% of Berlin's fuel and has received all its crude from Russia via the Druzhba pipeline since the plant was built in the 1960s.

The refinery, brought under state control under Germany's energy security law, can continue to operate but not at full capacity, a spokesperson for the economy ministry said on Friday.

Poland earlier this year offered to allocate capacity at its oil terminal in Gdansk and said it could ship crude oil via its pipelines from the port to Germany on the condition Rosneft was removed as an owner of Schwedt.

The Polish terminal has room to receive as much as 36 million tonnes of oil per year, leaving about 9 million tonnes on top of the needs of Polish refiners that could be used for Germany. (Reporting by Marek Strzelecki and Markus Wacket; editing by Jason Neely and Mark Potter)