Sweden and Finland have confirmed they will apply for Nato membership in a historic shift that comes as a result of Russia's invasion of Ukraine.
In Sweden, the governing Social Democrats said they backed joining the Western security alliance, paving the way for the country to apply.
The announcement came soon after Finland formally announced it too would apply to join the grouping.
Russia sees Nato as a security threat and has warned of "consequences".
Sweden stayed neutral in World War II and for more than two centuries has avoided joining military alliances.
Finland shares a 1,300-km (810-mile) border with Russia. Until now, it has stayed out of Nato to avoid antagonising its eastern neighbour.
In a statement, Sweden's Social Democrats said they would "work toward" membership, something supported by the public and most opposition parties. A formal application is likely within days.
But the Social Democrats added that they were opposed to stationing nuclear weapons or hosting Nato bases.
At a subsequent press conference, Prime Minister Magdalena Andersson said her party believed joining the alliance was "best for Sweden's and the Swedish people's security".
"For us Social Democrats, it is clear that the military non-alignment has served Sweden well, but our conclusion is that it won't serve us as well in the future," she added.
She also said Sweden would be left in a "vulnerable position" if it was the only country in the Baltic region that was not a Nato member.
Finland's President Sauli Niinisto earlier confirmed his country would apply, calling it a "historic day".
He spoke to Russia's President Vladmir Putin about the decision, saying he wanted to "say it straight".
"I, or Finland, are not known to sneak around and quietly disappear behind a corner," he said.
Russia's president had previously told Finland it would be a "mistake" to join Nato, which was founded in 1949 to counter the threat from the Soviet Union.
President Putin mentioned Ukraine's intention to join the alliance as one of the reasons for the invasion.
A monumental decision
The Social Democrats chose to announce their decision to back Nato membership with a low-key statement, half an hour before a scheduled news conference. But their decision is monumental, paving the way for Sweden to move away from a position of military neutrality for the first time in two centuries.
The announcement isn't surprising. Social Democrat ministers backed the findings of a cross-party report on Friday which concluded that membership would increase security in northern Europe and would be unlikely to trigger an armed attack from Russia.
Meanwhile public support for formally joining Nato has grown steadily since Russia invaded Ukraine. Most opposition parties are in favour, with just months to go until Sweden's next general election.
Still there are some within the Social Democrats - and in the opposition Left and Green parties - who are anxious about joining. Not everyone's convinced it makes military aggression from Russia less likely.
Others are already mourning the loss of a national identity as a neutral, peaceful nation that's used to staying out of major global conflicts.
Foreign ministers of Nato countries, who are meeting in Berlin, have pledged to provide security guarantees for both Finland and Sweden while their bids to join Nato are being ratified by all member states - a process that can take up to a year.
German Foreign Minister Annalena Baerbock said there could not be a "transition period, a grey zone, where their status is unclear".
Meanwhile both US Secretary of State Antony Blinken and Nato Secretary General Jens Stoltenberg said they were confident of overcoming Turkish objections to both Finland and Sweden's membership.
Turkey, a Nato member state, accuses both Nordic countries of having given support to the Kurdistan Workers Party (PKK), which has been waging an armed struggle against the Turkish government for decades.
On Sunday Turkish Foreign Minister Mevlut Cavusoglu said Sweden and Finland must stop supporting terrorists in their countries, provide clear security guarantees and lift export bans on Turkey.
But he added that Turkey was not threatening anybody or seeking leverage.
Mr Blinken said he had heard strong support for the Nordic countries "almost across the board" and he had held talks with his Turkish counterpart - "If that's [joining Nato] what they choose to do, I'm very confident that we will reach consensus on that," he said.
Mr Niinisto has said he is ready to hold talks with Turkish President Recep Tayyip Erdogan, Turkish media reported.
Both Sweden and Finland have Kurdish communities, and in Sweden's case some parliamentarians have Kurdish origins. Turkey has not provided proof that these communities have links with the PKK.