Ankara accuses Sweden of harbouring members of militant groups on its territory and has said it must crack down on them before it can join NATO.

The PKK, deemed a terrorist group by the European Union - to which Sweden belongs - and the United States as well as by Turkey, took up arms against the Turkish state in 1984.

A lower court in July sentenced Yahya Gungor, a Turkish Kurd, to four years and six months in prison followed by deportation for gun crime, attempted extortion and attempted funding of terrorism.

The Svea Court of Appeal found, as the district court had also done, that Gungor had tried to pressure a Kurdish businessman in Stockholm at gunpoint to pay money to the PKK.

In a statement, it said it upheld the Stockholm district court's verdict apart from the deportation decision, which it annulled.

"The Court of Appeal ... makes the assessment that there will be obstacles to enforcing the deportation once the man has served his sentence," it said.

Sweden has said it has fulfilled demands agreed upon in negotiations with Turkey, including introducing a new bill that makes being a member of a terrorist organization illegal.

Turkish President Tayyip Erdogan said recently that he would forward the ratification of Sweden's bid to parliament in the autumn but that he expects Stockholm to take steps against terrorism in return for Ankara's approval.

Sweden and neighbouring Finland applied for NATO membership last year following Russia's invasion of Ukraine. Finland joined the alliance in April.

(Reporting by Anna Ringstrom; Editing by Gareth Jones)