STOCKHOLM—Sweden has long been a haven for refugees and dissidents, from Iranians fleeing the Islamic revolution to Chileans escaping dictatorship, helping the country’s reputation as a peacemaker on the world stage.

But now this open-door policy is complicating Sweden’s bid to join NATO after Russia invaded Ukraine, with Turkey blocking Stockholm’s plans over its contacts with Kurdish groups hoping to carve out a homeland straddling the borders of Turkey and Syria.

Turkish President Recep Tayyip Erdogan accuses both Sweden and Finland of harboring terrorists, including Kurdish militants. Kurdish groups here fear that as political pressure builds, they could soon lose a key refuge as Sweden moves to strengthen its own security by applying, along with Finland, to join the North Atlantic Treaty Organization. All 30 members of NATO, including Turkey, must approve the entrance of any new members.

“We as Kurds respect Sweden’s decision to join NATO,” said Shiyar Ali, the Stockholm-based Nordic representative of the Kurdish autonomous administration in northeast Syria. “But we don’t want the membership and relations with Turkey to be at our expense.”

SHARE YOUR THOUGHTS

How do you think Turkey’s objection to having Sweden join NATO will be resolved? Join the conversation below.

Turkish and U.S. officials say Mr. Erdogan is motivated by longstanding concerns over Sweden’s contacts with members of a Syrian Kurdish organization that is linked to the Kurdistan Workers’ Party, or PKK—a group regarded as a terrorist organization by the U.S., Turkey and the European Union, including Sweden. The PKK has waged a long-running guerrilla war against the Turkish state in a conflict that has left as many as 40,000 people dead since 1984, according to the International Crisis Group. Like other Western nations, Sweden distinguishes between the PKK and other Kurdish groups.

Turkey is demanding that Sweden cut ties with the militant group, and has asked Swedish authorities to extradite its members , along with alleged followers of Fethullah Gulen, an exiled cleric who Turkey accuses of orchestrating a failed 2016 military coup attempt.

Finland is widely regarded as collateral damage in the dispute.

Turkey is also asking both Finland and Sweden to lift restrictions on weapons sales to Ankara. Sweden said last week that it doesn’t have an arms embargo against Turkey but that it hasn’t issued licenses for exports to Ankara since 2019, when Turkey launched military operations against the Kurds in northern Syria.

Turkish President Recep Tayyip Erdogan is blocking Sweden’s plans to join NATO.

Photo: adem altan/Agence France-Presse/Getty Images

Few observers believe that Sweden will extradite individuals to Turkey. Sweden’s Foreign Ministry has said it is continuing diplomatic efforts to resolve the impasse. But some Kurdish activists say they worry that the Swedish Security Service could take a harder line against members of Kurdish groups that oppose Turkey. Last year, a Kurdish mother of two was ordered deported after the Swedish Security Service labeled her a national security threat, without explaining why. Swedish Kurds also say arms sales to Turkey harm their cause as the weapons are likely to be used against Kurdish groups in Turkey and northern Syria.

Once largely homogenous, Sweden began opening up to immigrants by World War II. Among the first to arrive were those from Norway, Estonia and Denmark. Jews from across Europe came here. In the following decades, Iranians and refugees from the Balkan Wars settled in Sweden, followed by people escaping conflicts in Afghanistan, Syria and beyond.

There are no official statistics but Kurds in Sweden are believed to number around 100,000, or about 1% of the total population. They are not a homogenous entity. Over the past five decades, Kurds fleeing a military coup in Turkey in the 1970s, oppression under Iran’s Ayatollah Khomeini and Iraq’s Saddam Hussein, and war and persecution in Syria have set foot in Sweden.

Many Kurds who settled here were well educated and politically active. They became engaged in civil society and party politics across the political spectrum. Six Swedish parliamentarians are of Kurdish descent. Kurdish children can study both main dialects of Kurdish as their mother tongue in Swedish schools.

To the frustration of Turkey, Swedish politicians have met repeatedly with the YPG, a Syria-based Kurdish militia that Turkey sees as an extension of the PKK. The YPG spearheaded a campaign against Islamic State in Syria and received weapons and training from a U.S.-led military coalition supported by troops from Sweden. The political arm of the YPG, known as PYD, runs the autonomous government in northeast Syria.

The representative of the Kurdish community center in Stockholm likened the YPG to the people of Ukraine, who Sweden also supports. “They are innocent people who protect themselves. Islamic State was a threat to humanity,” the person said.

Mr. Ali, the autonomous region’s representative in Sweden, said his organization has what he called “ideological connections” with parts of the PKK, but no formal links. Independent analysts say the two are increasingly closely linked as the PKK, under pressure from a Turkish military campaign in Iraq, pushes its members into Syria.

Supporters of the Kurdish cause currently benefit from outsize political influence in Sweden. The coalition government headed by Prime Minister Magdalena Andersson relies on a majority of just one parliamentarian: the independent Amineh Kakabaveh, an Iranian-born former guerrilla fighter of Kurdish descent who has helped push the government to deepen its cooperation with the Kurdish self-ruled region in northern Syria.

Ms. Kakabaveh says she won’t vote for the government’s budget, which is up for negotiation this month, or for its re-election if it caves to any of Mr. Erdogan’s demands. On Tuesday, she abstained in a no-confidence vote against the Swedish justice minister in which she held the deciding ballot, propping up the government after saying she received assurances that Stockholm wouldn’t back down against Turkey.

Lawmaker Amineh Kakabaveh has helped push the Swedish government to deepen its cooperation with the Kurdish self-ruled region in northern Syria.

Photo: Ake Ericson for The Wall Street Journal

Still, Ms. Kakabaveh’s stance could delay Sweden’s membership of NATO if Turkey continues to press its demands, potentially until September, when fresh elections could reduce her importance, assuming she is re-elected at all.

“The government may want to play for time” before striking a deal with Turkey, said Jonas Hinnfors, professor of political science at Gothenburg University. “They have decided they want to join NATO. They will do what it takes.”

“I used to be so proud of Sweden, but not anymore,” Ms. Kakabaveh said, adding that she suspects Stockholm may still be willing to make some concessions to Mr. Erdogan. “My suggestion is, draw back the NATO application,” she said. “It is not worth selling our values and dignity to Erdogan.”

Turkey is also eager to detain several figures allegedly linked to Mr. Gulen, the exiled cleric who now lives in the U.S.

Among them is Levent Kenez, a former editor of Meydan newspaper, which was affiliated with Mr. Gulen, and who fled Turkey for Sweden during the media crackdown following the 2016 coup attempt. He said that when Sweden began considering a NATO bid, he suspected that he and others would become “a pawn in a chess game.”

Journalist Levent Kenez fled Turkey for Sweden during the media crackdown following the 2016 coup attempt.

Photo: Ake Ericson for The Wall Street Journal

Abdullah Bozkurt, another alleged Gulen affiliate who runs a news website from Stockholm with Mr. Kenez, said several men attacked him in late 2020 outside his house, hitting and kicking him until a neighbor intervened. Mr. Bozkurt said he suspects the attackers were sent by the Turkish government or were vigilantes who supported Mr. Erdogan’s rule.

“Perhaps it was just a message,” he said.

Turkey’s Foreign Ministry didn’t respond immediately to a request for comment.

After fruitless discussions between senior Swedish, Finnish and Turkish officials in Ankara on May 25, NATO Secretary-General Jens Stoltenberg said he would gather officials from the three countries in Brussels in the coming days.

Western officials are under pressure to resolve the disagreement before a NATO leaders summit at the end of June. Turkish officials say they are in no rush.

“It can be sorted out with negotiations but it will take time,” said Ilnur Cevik, a senior foreign-policy adviser to Mr. Erdogan. “Time is not on the side of NATO expansions, because if they try to push it through until the end of June, that won’t happen.”

Abdullah Bozkurt runs a news website with Levent Kenez.

Photo: Ake Ericson for The Wall Street Journal

Write to Sune Engel Rasmussen at sune.rasmussen@wsj.com