For months, NATO leaders had hoped that when they convened for their annual summit next week, they could use the occasion to welcome Sweden as the alliance’s newest member.

Now, that outcome appears all but impossible, as stalling by Hungary and continued objections by President Recep Tayyip Erdogan of Turkey have drawn out the process, raising questions about when Sweden might be able to join and what sort of breakthrough would be necessary.

All 31 member states must agree to admit new members, and the split over Sweden risks denting the alliance’s ability to project a united front against President Vladimir V. Putin of Russia as his forces seek to beat back a Ukrainian counteroffensive.

NATO officials say the hope is to get all the alliance’s leaders to agree at the two-day summit set to begin on Tuesday in Vilnius, the Lithuanian capital, to let Sweden join. Then, the thinking goes, Mr. Erdogan and Prime Minister Viktor Orban of Hungary can push the approval through their respective parliaments.

To that end, Jens Stoltenberg, the NATO secretary general, will meet senior foreign, defense and intelligence officials from Turkey, Sweden and Finland in Brussels on Thursday, in an effort to convince the Turks that Sweden, like Finland, has done enough to overcome Turkish objections.

On Tuesday, Foreign Minister Peter Szijjarto of Hungary told reporters that he was in touch with his Turkish counterpart and that if the Turkish position changed, Hungary would not obstruct the process.

That leaves the ball in Mr. Erdogan’s court, and if next week’s summit ends with no agreement, it is unclear what would break the deadlock, or when. NATO officials worry that Swedish membership could then linger for many months, a symbolic victory for Mr. Putin and loss for the alliance.

At the same time, Mr. Stoltenberg argued in an interview that Sweden is already involved in all NATO meetings and in defense planning and military exercises. But Sweden would remain outside NATO’s commitment to collective defense, a core purpose of the alliance.

“If there no agreement in Vilnius, then we have crisis in NATO, period,” said Marc Pierini, a senior fellow at Carnegie Europe and a former European Union ambassador to Turkey.

On Wednesday in Washington, President Biden met Prime Minister Ulf Kristersson of Sweden to repeat American support for Sweden’s membership in the alliance. Mr. Biden said he was “anxiously looking forward” to that day, but conceded that the decision rests in the hands of Mr. Erdogan.

“I want to reiterate the United States fully, fully, fully supports Sweden’s membership in NATO,” Mr. Biden said. “The bottom line is simple: Sweden is going to make our alliance stronger.”

In the 14 months since Sweden applied to join the alliance, the issue of its ascension has become ensnared in a complex web of issues, including international weapons agreements and competing conceptions of terrorism and freedom of expression.

Turkey has accused Sweden of providing a free operating environment to Turkish dissidents that Turkey considers terrorists. These include members of a religious movement that Turkey has accused of attempting to overthrow Mr. Erdogan in 2016 and supporters of a Kurdish militant organization that has fought a bloody insurgency against the Turkish state.

Sweden has sought to meet Turkish demands by amending its Constitution and hardening its counterterrorism laws, which went into effect only on June 1. It has also agreed to extradite a small number of people wanted by the Turks.

Last month, Sweden’s Supreme Court ruled that Sweden could extradite a Turkish man wanted in Turkey for drug crimes. The man, who has not been identified, told the court he was being targeted because he supported a pro-Kurdish political party.

But Swedish courts have blocked at least one other extradition, saying that a journalist wanted by Turkey had not committed acts considered crimes in Sweden.

“If you look at Turkey, of course the goal is and has been for more than a year to extract as many concessions as possible from Sweden before agreeing to accession,” Mr. Pierini said. “If you look at Sweden’s perspective, they are trying to protect their conception of rule of law.”

Mr. Stoltenberg and other NATO leaders have said that Sweden has done enough and should be allowed to join the alliance. Many analysts also suspected that Mr. Erdogan’s tough line on Sweden was aimed at rallying nationalist voters at home in the run up to Turkey’s presidential election in May, in which Mr. Erdogan won a third term.

But Mr. Erdogan’s stance has not changed since the election, and he lashed out again at Sweden after a protester publicly burned a Quran at a demonstration in the Swedish capital, Stockholm, last week, accusing Sweden of failing to combat Islamophobia. The act appeared aimed at derailing the NATO talks and was carried out in front of a large mosque on one of Islam’s most important holidays.

“We have clearly stated that it is our red line to determinedly combat terrorist organizations and Islamophobia,” Mr. Erdogan said following a meeting with his Cabinet on Monday. “The sooner our counterparts embrace this reality, the healthier this process will be.”

The incident frustrated NATO officials, who noted that combating Islamophobia was not among the issues the parties had agreed to work on to facilitate Sweden’s accession bid. And the Swedes pointed out that the police had tried to ban the protest but were overruled by the courts.

The issue is key for Mr. Erdogan, who has marketed himself to his conservative, religious base at home as a global defender of Islamic causes.

“When it comes to giving an impression to the domestic public that this is a government that actually puts its money where its mouth is, it is a consistent attitude,” said Ahmet Kasim Han, a professor of international relations at Beykoz University in Istanbul. “It goes very well with the public image of the president himself.”

Mr. Han said potential pathways to a breakthrough remained. Sweden could do more to meet Turkey’s demands, he said, or the United States and other NATO members could throw in “sweeteners” such as arms or economic agreements to win over the Turks. A thaw in the chilly relationship between Mr. Erdogan and Mr. Biden would also help; the American president has not welcomed Mr. Erdogan in the White House, unlike his three predecessors.

“Turkey either wants to have strong sympathies and actions for its own security concerns or wants to strike a grand bargain with Berlin, Brussels and Washington on issues pertaining to larger foreign and security policy agendas,” Mr. Han said.

The Biden administration has pushed hard for NATO expansion. Turkey wants to buy $20 billion worth of F-16 fighter jets and other equipment from the United States, but administration officials have rejected the idea that Mr. Biden would use this to pressure Mr. Erdogan on NATO expansion.

Still, a breakthrough on Sweden could lessen resistance to the deal in Congress.

Mr. Biden mentioned Sweden and the weapons deal together when telling reporters last month about his call with Mr. Erdogan to congratulate him on his re-election.

“He still wants to work on something on the F-16s,” Mr. Biden said of Mr. Erdogan. “I told him we wanted a deal with Sweden, so let’s get that done.”