STOCKHOLM — It would have been just a domestic political crisis at another time in Sweden: a senior cabinet member facing a vote of no-confidence from a disgruntled opposition and a vow from his party to support him.
But an effort by right-wing lawmakers to oust Sweden’s justice minister over rising gun violence has become embroiled in geopolitics, complicating the country’s application to join NATO following the Russian invasion of Ukraine.
The government of Prime Minister Magdalena Andersson on Tuesday averted a political crisis when a lawmaker of Iranian-Kurdish origin abstained from the no-confidence vote, after securing a commitment that Sweden would not bow to Turkish demands over a Swedish bid to become a member of the alliance. That left the opposition one vote short of the majority it needed to remove the justice minister, Morgan Johansson.
President Recep Tayyip Erdogan of Turkey has threatened to block Sweden and Finland from joining NATO, criticizing the nations for hosting Kurdish militants he views as his country’s main enemy and which he has branded as “terrorists.”
The latest round of political instability began after Sweden’s far-right parties accused the center-left government of failing to address increasing gun violence and crime in the country, tying it to rising levels of immigration, and called for Mr. Johansson to step down. Conservative parties also supported the no-confidence motion.
“Sweden has turned into a gangster country,” Jimmie Akesson, the leader of the far-right Swedish Democrats party said on Twitter. “Insecurity is taking hold and gang crime is anything but solved.”
The government has said it viewed the vote against Mr. Johansson as a vote against it, with Ms. Andersson vowing to resign if the effort succeeded. The government said it had already toughened policing and tackled crime in recent years, including a raft of new measures after riots in April between far-right extremists and their opponents injured several police officers.
“We are in a very sensitive position for our NATO application — together with Finland.” Ms. Andersson said on Thursday, calling the no-confidence effort “utterly irresponsible.”
She added: “We are not in a position to play political games in Sweden. It’s dangerous.”
Jonas Hinnfors, a political scientist at the University of Gothenburg, said that with Swedes heading to the polls for a general election in September, the opposition was taking a calculated risk against a weak coalition government. “It’s a way for the opposition to show it’s a fragile government with an election coming up.”
With the votes for and against the no-confidence motion divided, the deciding vote for a majority was left to one independent lawmaker, Amineh Kakabaveh, a Swede of Iranian-Kurdish descent and a former Kurdish fighter, who demanded that the government not capitulate to Turkey.
Ms. Kakabaveh said in an interview that she had wanted to put pressure on the government to not concede to Mr. Erdogan’s demands, and stand up for Sweden’s values of human rights and independence.
Her decision to abstain came after the government said it would support Kurdish militias fighting the Islamic State in Syria.
Mr. Erdogan wants Sweden to cut ties with fighters in Syria who are affiliated with the Kurdistan Workers’ Party, or P.K.K., which seeks an independent Kurdish state in areas partly within Turkey’s borders.
The United States and the European Union have designated the P.K.K. as a terrorist organization, although governments like Sweden are more sympathetic, viewing it as a Kurdish nationalist movement.
“Foreign power should not decide who sits in the Swedish government or Swedish sovereignty, Swedish laws and Swedish values,” said Ms. Kakabaveh, known as a high profile feminist in Sweden who brokered an agreement last November to back Ms. Andersson’s leadership. That was in exchange for assurances that the government would cooperate with the Syrian Democratic Union Party, a Kurdish left-wing group, and work for the release of imprisoned Kurdish politicians in Turkey, among other things.
“Her agenda has always been for the Kurdish groups who have fought against Daesh and against Turkey in various ways,” said Mr. Hinnfors, the political scientist, using an Arabic acronym of the Islamic State.
He said that Ms. Kakabaveh, who originally was elected with the Left party before becoming an independent — and will not be in contention for a seat without a party affiliation — was trying to make the most of her time remaining as a lawmaker. “Some kind of appeasement of Erdogan is probably in Sweden’s interest to secure the NATO application,” he said. “But it would be against her interests.”
Christina Anderson reported from Stockholm, and Isabella Kwai from London.