Finland has made its first move towards joining Nato, and Sweden could follow within days - a monumental shift for two nations with a long history of wartime neutrality and staying out of military alliances.
Russia strongly opposes the two states joining and uses the expansion of the West's defensive military alliance as a pretext for its war in Ukraine.
If they do, it will end over 200 years of Swedish non-alignment. Finland adopted neutrality following a bitter defeat by the Soviet Union during World War Two.
Finnish public support for joining Nato was for years at around 20-25%. But since Russia's invasion of Ukraine, it has shot up to a record high of 76%, according to the latest opinion poll. In Sweden, 57% of the population want to join, again far higher than before the war.
On Thursday, Finnish President Sauli Niinisto urged his country to apply for Nato membership "without delay", with the wider government expected to formally announce its decision on Sunday.
Sweden's ruling party, too, is expected to deliver a verdict at the weekend.
If it is a yes, both parliaments will have clear majorities in favour of membership, and the application process can begin.
While the Finnish Social Democrats are likely to be in favour, Sweden's Social Democrats have been split on the issue, and are currently holding an internal consultation. However party Nato-sceptics appear to be leaning towards joining. "Everything appears to be going in that direction," says ex-Foreign Minister Margot Wallstrom.
The US says it is confident it can address any security concerns either country might have in the period between applying and formally becoming members.
UK Prime Minister Boris Johnson visited both countries on Wednesday to discuss their "broader security issues". That resulted in a new agreement to come to each other's aid if attacked, potentially allaying some fears.
Why join now?
Vladimir Putin's actions have shattered a long-standing sense of stability in northern Europe, leaving Sweden and Finland feeling vulnerable.
Finnish ex-Prime Minister Alexander Stubb says joining the alliance was a "done deal" for his country as soon as Russian troops invaded Ukraine on 24 February.
Swedish Defence Minister Peter Hultqvist describes that day as the moment the Russian leader proved he was "unpredictable, unreliable and prepared to wage a cruel, bloody and brutal war". After promising Sweden would never join Nato last November, he now talks of the Nordic region's defences being strengthened if both countries sign up.
Ultimately, many Finns and Swedes are looking to Nato in the belief it will keep them safe in an uncertain Europe.
For Finns, events in Ukraine bring a haunting sense of familiarity. The Soviets invaded Finland in late 1939. For more than three months the Finnish army put up fierce resistance, despite being heavily outnumbered.
They avoided occupation, but ended up losing 10% of their territory.
Watching the war in Ukraine unfold is like reliving this history, says Iro Sarkka, a political scientist at the University of Helsinki. Finns are looking at their 1,340km (830 mile) border with Russia, she says, and thinking: "Could this happen to us?"
Sweden has also felt endangered in recent years, with several reported airspace violations by Russian military aircraft.
In 2014, Swedes were transfixed by reports that a Russian submarine was lurking in the shallow waters of the Stockholm archipelago.
Two years later Sweden's army returned to the small but strategically important Baltic Sea island of Gotland, after abandoning it for two decades.
What would change?
In some ways, not much. Sweden and Finland became official partners of Nato in 1994 and have since become major contributors to the alliance. They have taken part in several Nato missions since the end of the Cold War.
A major change would be the application of Nato's "Article 5", which views an attack on one member state as an attack on all. For the first time, Finland and Sweden would have security guarantees from nuclear states.
Although the debate has shifted in favour of membership very quickly in both countries, historian Henrik Meinander argues Finland was mentally prepared for it. Small steps towards Nato have progressively been taken since the fall of the Soviet Union, he says.
In 1992, Helsinki bought 64 US combat planes. Three years later, it joined the European Union, alongside Sweden. Every Finnish government since then has reviewed the so-called Nato option, he says. The army, which serves a population of 5.5 million, has a wartime strength of 280,000 soldiers, and in total 900,000 reservists.
Sweden took a different path in the 1990s, reducing the size of its military and changing priorities from territorial defence to peacekeeping missions around the world. But that all changed in 2014, when Russia annexed Crimea from Ukraine. Conscription returned and defence spending was boosted. In 2018, every household received army pamphlets titled "if crisis or war comes" - the first time they were sent out since 1991.
Finland has already reached Nato's agreed defence spending target of 2% of GDP, and Sweden has drawn up plans to do so.
What are the risks?
President Putin has frequently used the prospect of Nato expanding to Ukraine to justify his invasion. So Sweden and Finland joining the alliance would be perceived as a provocation.
Russia's foreign ministry says both countries have been warned of the "consequences" of such a move. Dmitry Medvedev, a close ally of the Russian leader, has warned that Nato accession may prompt Moscow to deploy nuclear weapons in Kaliningrad, the Russian exclave between Poland and Lithuania.
While not dismissing these threats, Alexander Stubb suggests a more realistic risk is of Russian cyber attacks, disinformation campaigns and occasional airspace violations.
Would Nato make Sweden and Finland safer?
There is a significant minority, at least in Sweden, who believe it would not.
Deborah Solomon, from the Swedish Peace and Arbitration Society, argues that Nato's nuclear deterrence increases tensions and risks an arms race with Russia. This complicates peace efforts, she says, and makes Sweden a less safe place.
Another fear is that in joining the alliance, Sweden would lose its leading role in global nuclear disarmament efforts. Margot Wallstrom recalls how some Nato foreign ministers were heavily pressured by the US not to take part in UN disarmament negotiations in 2019.
But Mr Hultqvist, the current defence minister, maintains there is no contradiction between Nato membership and Sweden's disarmament ambitions.
Many of Sweden's Nato-sceptics look back to the 1960s-80s, when Sweden used its neutrality to position itself as an international mediator and ally to the colonised world. It vocally criticised the Soviet Union and US, and says at one point in the 1970s it was the only Western country to support South Africa's anti-apartheid movement.
If Sweden joins Nato, it would be "abandoning the dream" of being a mediator, Ms Solomon says.
Finland's neutrality was very different. It came about as a condition of peace imposed by the Soviet Union in a 1948 "friendship agreement". It was seen as a pragmatic way of surviving and maintaining the country's independence.
Sweden's neutrality was a matter of identity and ideology, whereas in Finland it was a question of existence, says Henrik Meinander. Part of the reason Sweden can even afford to have a debate about Nato membership is because it uses Finland and the Baltics as a "buffer zone", he believes.
Finland abandoned its neutrality after the Soviet Union collapsed. It looked to the West and sought to free itself from the Soviet sphere of influence. Joining the European Union was seen as offering not only economic advantages but security benefits too.
Iro Sarkka suggests joining Nato was seen as too big a step for Finland to take in the early 1990s, having just emerged from neutrality.
But times and perceptions of risk have changed. Now, most Finns say they are ready.