(Bloomberg) -- Finland and Sweden are set to apply for membership in the NATO defense bloc after Russia’s invasion of Ukraine is ending an era of the two Nordic nations shunning military alliances.

Finland’s parliament is expected in coming days to approve a formal decision to seek membership that President Sauli Niinisto and Prime Minister Sanna Marin announced at a news conference in Helsinki on Sunday. Neighboring Sweden’s ruling Social Democrats reversed their long-held opposition to NATO membership later in the day, removing the last obstacle to joining Finland’s bid.

The move heralds one of the most prominent changes in the European security landscape after Russia’s war against Ukraine led to shifts including a ramp-up of defense spending in Germany. The Feb. 24 invasion of Ukraine prompted an almost overnight change in public opposition to membership in the North Atlantic Treaty Organization in Finland and Sweden, even as Russia has kept warning the pair with potential consequences.

Sweden’s Social Democrats “will work for Sweden to apply for membership in NATO,” the party said in a statement on Sunday. Still, the party will advocate that Sweden expresses “unilateral reservations against the deployment of nuclear weapons and permanent bases on Swedish territory.”

Read More: Finland Applies to Join NATO to Deter Russian Aggression 

Both countries’ lawmakers are set to debate the bids on Monday, while Sweden is likely to submit an application to join NATO in coming days, according to local media reports. 

On Monday, Niinisto is set to meet Republican Senate Minority Leader Mitch McConnell in Helsinki, along with other Republican senators, as he continues a campaign to ensure bipartisan support for NATO accession. McConnell is also due to visit Sweden. The Finnish president is due in Stockholm for a two-day state visit starting Tuesday.

The Nordic countries were met with widespread support by NATO foreign ministers gathering in Berlin on Saturday, as policy makers are seeking to calm concerns that Turkey could derail their bid, citing concerns over Kurdish “terrorists.” The 30-member military bloc requires unanimity to bring in new members.

The membership bids would need to be ratified by NATO countries’ parliaments, a process that can take months, before they gain entry and begin to enjoy collective defense commitments under Article 5. Both countries have already won pledges from allies including the US and UK about additional security steps for the so-called grey period between the filing of entry bids and the eventual entry when collective security guarantees begin to apply to them.

US Secretary of State Antony Blinken said on Sunday he’s “very confident” allies will reach a consensus on Finland and Sweden. His comments were echoed by the bloc’s secretary general Jens Stoltenberg, who said Turkey “has made it clear that its intention is not to block membership” of NATO for Finland and Sweden.

Niinisto said Turkey’s President Recep Tayyip Erdogan had said about a month ago that he would assess Finland’s NATO application “favorably,” and so “you can understand I am a bit confused.” Niinisto urged “a clear answer” from Erdogan and said that he was prepared to meet to discuss the issues raised.

The entry of Sweden and Finland would significantly extend the alliance’s border with Russia and give the organization scope to protect the Baltic countries of Estonia, Latvia and Lithuania, long seen as a vulnerable region. It would effectively isolate Russia’s enclave of Kaliningrad sandwiched between Poland and Lithuania on the Baltic Sea.

Read More: NATO Expansion Could Finally Shore Up Alliance’s Weakest Flank

“We see a very different kind of Russia today than we saw just a few months ago,” Finland’s Marin told reporters in Helsinki. “We cannot trust anymore that there will be a peaceful future next to Russia on our own.”

President Niinisto phoned Russian President Vladimir Putin on Saturday to say the Nordic country plans to seek NATO membership. The move would be a “mistake because there are no threats to Finland’s security,” Putin told his Finnish counterpart, according to a statement from the Kremlin, adding that it could harm relations between the countries.

Putin’s reaction to the Finnish plan was “milder than ever before,” Niinisto told reporters on Sunday. “It may be that they want to avoid” this becoming a topic of discussion in Russia, he said.

Sweden and Finland have centuries of common history as well as rivalry with Russia. The two nations were one until 1809, when Russia conquered current-day Finland in the last war fought on Swedish territory.

Having won independence in 1917 after more than 100 years as a Grand Duchy of the Russian Empire, Finns fought two wars with the Soviet Union. They then tiptoed through an era of neutrality during the Cold War -- by necessity, not by choice -- cowering to Moscow while retaining independence in a policy that came to be known as Finlandization.

Sweden stayed out of both world wars, and as the two superpowers vied for influence in the post-war period, neutrality was seen as the best way of ensuring the country’s independence, while the country covertly cooperated with NATO.

After the collapse of the Soviet Union in 1991, Sweden’s policy was officially re-branded as military non-alignment, and its defense was significantly scaled down. That trend was reversed after Russia’s 2014 annexation of the Ukrainian Crimea peninsula, and in recent years, Sweden has gradually ramped up military spending and sought ever closer cooperation with NATO, similarly to Finland.

Both nation’s militaries are compatible with NATO and include a large number of artillery and tanks. Finland, whose border with Russia is roughly 1,300 kilometers (800 miles) long, held onto a conscription-based system, commanding a reserve of 900,000 troops and being able to deploy 280,000 of them in war time. Sweden brought back military conscription from 2018.

Read More: Sweden Revives Cold-War Forces to Help Shield Baltic From Putin

While Sweden’s Social Democrats remained staunch supporters of military non-alignment until recently, that approach has been reevaluated rapidly following Russia’s invasion, with even defense minister Peter Hultqvist warming to the idea. He’d vowed at a party congress last year that “there will be no NATO application as long as we have a Social Democratic government.”

©2022 Bloomberg L.P.