More than two decades after the collapse of the Soviet Union brought an end to the Cold War, Ukraine's crisis is driving the United States-led defence alliance back to its original purpose: To protect its members against a perceived Russian threat.
President Vladimir Putin's annexation of Crimea and support for Russian-speaking separatists in eastern Ukraine has raised dramatically a sense of vulnerability among NATO's new eastern members from the Baltic to the Black Sea.
It has also highlighted unresolved questions about security in countries such as Georgia and Moldova as well as Ukraine in the post-Soviet space sandwiched between NATO and Russia.
When NATO's 28 leaders hold a summit in Wales on September 4-5, military plans to reassure former Soviet bloc states Poland, Estonia, Latvia and Lithuania will top the agenda. The future of NATO's frozen relations with Russia will also loom large.
That will eclipse the impending end of the alliance's longest, least popular and least successful overseas mission in Afghanistan - a high-casualty stalemate against Taliban fighters who still threaten Kabul.
"Six months into the Russia-Ukraine crisis we must agree on long-term measures to strengthen our ability to respond quickly to any threat, to reassure those allies who fear for their own country's security and to deter any Russian aggression," British Prime Minister David Cameron, the summit host, said in a letter of invitation to fellow leaders.
NATO has made clear it will not use force to support Ukraine, which is not an alliance member. At the same time it has warned Russia, which has mobilised 20,000 troops just across the border, against military intervention in eastern Ukraine under the guise of a humanitarian or peacekeeping operation.
"We are not considering military operations," NATO chief Anders Fogh Rasmussen told Reuters in an interview this week.
"If the Russians were to intervene further in Ukraine, I have no doubt that the international community would respond determinedly, notably through broader, deeper, tougher economic sanctions that would isolate Russia further," he said.
Whether to permanently station NATO forces east of the Cold War era east-west border, or just to store weapons there, modernise air bases and increase joint exercises and air patrols, will be one of the main topics at the summit.
Cameron called for a new schedule of exercises, building new military infrastructure, pre-positioning equipment and supplies, and enhancing the NATO Response Force of up to 25,000 troops.
However, the easterners want "boots on the ground" with forward-based troops and a NATO headquarters on their soil to deter any Russian attempt to destabilise their region.
An opinion poll found nearly three-quarters of Germans oppose permanent NATO bases in eastern members.
Polish Foreign Minister Radoslaw Sikorski told Reuters NATO member states were close to reaching consensus over steps to beef up the alliance's military presence in eastern Europe.
"We've welcomed the proposals by the military authorities of the alliance who have formulated what they think a reasonable reassurance package is," he said in an interview.
A senior NATO official said the likely compromise would be called a "persistent presence".
A designated command structure will be established to defend the eastern allies, upgrading an existing joint German-Polish-Danish headquarters in Szcezcin, Poland, with frequent visits and exercises but no permanently deployed allied forces.
"Everything we've seen so far says NATO is not going to war over Ukraine," said Stephen Pifer, a former US ambassador to Kiev now at the Brookings Institution think-tank in Washington.
"The real focus is on looking at the European NATO allies and reassuring them."
The return of territorial defence as a priority upends two decades of evolving NATO doctrine.
"After the collapse of the Soviet Union, the prevailing message at NATO was 'out of area or out of business'," said a senior NATO official, citing a landmark 1993 RAND Corporation analysis of the alliance's future.
"Either we responded to new security challenges beyond our borders - in Bosnia, Kosovo, Afghanistan, on terrorism and in cybersecurity - or the alliance would become irrelevant."
US officials came to regard NATO mostly as a toolbox for building coalitions of the willing for expeditionary warfare or humanitarian missions.
"Now to some extent it's 'back to basics'. There's a renewed emphasis on Article V," the official said, referring to the mutual defence commitment enshrined in the founding 1949 North Atlantic Treaty.
However, unlike during the Cold War, there is no sense that Russia is the sole security threat.
Putin's assertion of a right to defend Russian speakers beyond his borders alarmed NATO allies, especially Baltic states with sizeable Russian minorities, but it falls short of the global ideological confrontation with communism.
Moscow and the West have continued to cooperate on issues such as curbing Iran's nuclear programme and disarming Syria of chemical weapons despite the conflict in Ukraine.
Mediterranean NATO allies, who see the main threats to their security in instability in Africa and the Middle East, are eager to maintain a dialogue with Russia and avoid any return to a purely Cold War posture.
So the alliance needs to be able to handle both crisis management missions and territorial defence.
That is a tall order given the sharp shrinkage of defence spending in most NATO countries, which took a peace dividend after the Soviet Union collapsed and have cut military outlays further since financial crisis struck in 2008.
Most European allies spend far less than the NATO objective of 2 percent of economic output. Only Poland is significantly raising its defence budget.
Latvia and Lithuania, among those pleading loudest for a NATO presence, spend respectively just 0.9 and 0.8 percent of their GDP on defence although they have pledged to meet the alliance's spending target by 2020.
Washington wants a firm commitment from allies to increase military outlays but expectations are low.
One divisive issue NATO leaders are likely to avoid in Wales is any further enlargement of the alliance.
Some analysts blame an ambiguous compromise in 2008, when NATO agreed that Georgia and Ukraine would eventually become members but did not put them on a path to membership, for triggering a war that year between Georgia and Russia.
Putin has made clear NATO enlargement up to Russia's borders is a red line for Moscow. He justified the annexation of Crimea partly by saying NATO warships might otherwise have taken over the Russian Black Sea fleet base in Sevastopol.
A senior US official involved in summit preparations acknowledged: "There is not unanimity within the alliance about enlargement."
Washington and its allies will reaffirm that NATO's door remains open but avoid any move that might be deemed provocative by Russia, he said, adding: "This is not an enlargement summit."
That means the countries between NATO and Russia are likely to remain an unstable buffer zone for years to come.
No one knows whether the Russian leader will escalate the conflict before the NATO summit or calm things down to avoid a harsher reaction.
"The harder things are on the ground, the more aggressive the mood music at the summit will be," said Janine Davidson, a former US Defence Department official and now a senior fellow at the Council on Foreign Relations.