VILNIUS, Lithuania — NATO had some significant successes at its summit that ended Wednesday as it worked hard to project unity in support of Ukraine’s bloody defense against Russia’s invasion.

Turkey lifted its objections to Sweden’s membership. The alliance approved new spending goals and its most ambitious military plans for Europe’s defense since the Cold War. There were new commitments for long-term support for Kyiv. And all 31 member states agreed that Ukraine belongs in NATO, a significant shift stemming from its brave, resilient defense of its country and of Western values.

Even so, the summit’s final communiqué, with its ambiguous diplomatic language, does not disguise some serious strains among alliance members in the bitter fight over how to describe Ukraine’s path toward NATO membership. Ukraine was promised an invitation “when allies agree and conditions are met,” leaving both the timing and the conditions safely unsaid.

President Volodymyr Zelensky of Ukraine and his most vocal Central European supporters wanted more, and made it loud and clear.

Mr. Zelensky has never pushed for Ukrainian NATO membership while the war is raging, nor has anyone else. But he was angry about NATO putting conditions on even inviting Ukraine to apply for membership. He posted a furious Twitter message on Tuesday when confronted with the draft language of the communiqué that infuriated the Americans, a NATO-country official said.

While he softened his public language on Wednesday, even Tuesday night he was threatening not to appear at the first session of a NATO-Ukraine Council, the official said.

He and his supporters were not alone in their disappointment. John Kornblum, an experienced diplomat and former American ambassador to Germany, now retired, was especially harsh. He called the communiqué confused and weak.

“It screams fear and insecurity from every word,” Mr. Kornblum said. “Ukraine’s future is with NATO, fine. But please don’t ask when or how NATO entry will happen. Just make some (unidentified) reforms and we shall see.”

After the summit, President Emmanuel Macron of France said it was “legitimate for the Ukrainian president to be demanding with us, because he is fighting on the ground.” But he said, “We did what we needed to do, and we did it by keeping the allies united.”

The summit had delivered concrete short- and long-term military aid for Ukraine, he insisted, and had “made it very clear that the path to NATO was there.”

Others saw “a failed opportunity,” as Michal Baranowski, a managing director of the German Marshall Fund, based in Warsaw, described it. But, he said, after so many months of war and so many billions of Western dollars and euros in weapons and funding, “Ukraine has never been closer to NATO.”

When Ukraine was initially promised membership in 2008, at a summit in Bucharest, that statement was a way to cover over deeper and lasting divisions, with Germany and France absolutely opposed to Ukrainian membership then, while Washington wanted to give Kyiv a clear path to join.

But now every country agrees that Ukraine will join NATO, even if the path and timing remain undefined.

The result in Vilnius was “not as weak as expected, but not as good as necessary,” said François Heisbourg, a French defense analyst. Given the strong opposition of Germany and the United States to providing a detailed pathway for Ukraine, the statement was about all that could be attained, he said.

Still, “the conceptual and political course has been set,” he said. “Ukraine will enter NATO. This will now happen, and that is a big cultural shift over the last month or so.”

Ben Wallace, Britain’s defense secretary, agreed. “I think the win here for Ukraine is the sort of cultural acceptance that Ukraine belongs in NATO,” he said. No country disagreed about that, he said. “And the word ‘belongs’ implies it is going to happen. It’s not an if, it is a when.”

That acceptance came from a shift in both American and French policy, with President Biden willing to let Ukraine skip the preliminary Membership Action Program that every other post-Soviet country had to undergo.

Mr. Macron himself, beginning with a major speech June 1 in Bratislava, has moved from opposition to Ukrainian membership to strong support for it, partly trying to rebuild relations with Central Europe and partly because of Ukraine’s resilience in the face of Russia’s brutal attack.

Ukraine does come away with significant benefits, argued Jens Stoltenberg, the NATO secretary general. In addition to the clear promise of membership, more promises of weapons and the ability to skip the MAP, Kyiv’s relationship with NATO has been significantly upgraded with the NATO-Ukraine Council, where Ukraine can sit as an equal and work to get ready for membership.

And on Wednesday, the Group of 7 industrial nations issued a joint declaration pledging long-term security assistance for Ukraine to bolster the besieged country’s defenses during and after its war with Russia — and through the next American presidential election, too.

The declaration lays the groundwork for individual nations to negotiate their own arrangements with Ukraine for military and financial support, while keeping such commitments separate from NATO, which is eager not to seem like a combatant in the war and feed Russia’s narrative that it is defending itself in Ukraine against NATO.

The commitments are intended “to help Ukraine build a strong, capable defense,” President Biden said, both now and after this conflict ends, to make it unlikely that Russia would attempt to invade it again before Ukraine can enter NATO and its guarantee of collective defense.

Despite any friction here, he praised Mr. Zelensky and Ukrainians, saying: “You set an example to the whole world when it comes to genuine courage. Not only all of you but your people — your sons, your daughters, your husbands, your wives, your friends: You’re incredible.”

Chancellor Olaf Scholz of Germany said the Group of 7’s arrangement makes it possible for signatories to further specify their concrete contributions to Ukraine and embed them “in a longer-term strategy which Ukraine can then rely on.”

Mr. Zelensky thanked Mr. Biden in particular and said that these new commitments were a “victory for Ukraine — for our country, for our people, for our children.”

But NATO also missed opportunities, argued Camille Grand, a former senior NATO official now with the European Council on Foreign Relations. It could have been more precise about what Ukraine must do to become a member when the conflict ends, he said.

For instance, he said, “it could have spelled out what the new NATO-Ukraine Council could do about it, and could have mandated it to work with Kyiv on a path to accession and report to the next NATO summit next year.”

Underneath the language is a more important discussion NATO must have, he said. When “conditions allow” means when the conflict ends. But end how, and in what place, is another source of internal alliance division, even as NATO countries hope the Ukrainian counteroffensive will be a great success.

“There needs to be a more substantive conversation of what is the right moment to bring Ukraine in,” he said. “Some allies say it means total peace, some say it means a lasting cease-fire, some say it means a stable line of control,” he said. “But going there publicly is difficult, because you give Putin lines in the sand he can manipulate.”

Mr. Heisbourg agreed. Everyone accepts Ukraine can’t join during a war, so a date certain for accession is impossible. “But you could say what the timetable should be,” he said. “And then describe the three or four milestones Ukraine must meet as part of the process.”

Lara Jakes contributed reporting.