Swedish Prime Minister Magdalena Andersson formally announced Monday that her country will apply for NATO membership, ending more than 200 years of military neutrality in the wake of Russia's invasion of Ukraine.

The announcement comes on the heels of a similarly historic declaration by Finland, ready to risk Russia's ire to gain security against its powerful neighbor through the North Atlantic Treaty Organization's collective defense guarantee.

The Nordic countries joined the European Union in 1995 but had remained outside of NATO to avoid provoking Russia, which has long pushed against the trans-Atlantic alliance enlarging and moving closer to its borders.

But Russia's invasion of Ukraine, a non-NATO member, made them reconsider their status, which would change the history of the European geopolitical landscape.

Sweden has not participated in a war since the Napoleonic Wars in the 19th century, when it lost territory, and has preferred neutral mediation roles in international disputes. Finland, which has a 1,300-kilometer border with Russia, adopted neutrality after its defeat by the Soviet Union during World War II.

The Swedish government's formal decision came a day after the Social Democratic Party backed the plan, reversing its decades-old opposition to joining NATO and abandoning its military nonalignment. However, the ruling party, led by Andersson, has said it is against nuclear weapons deployment in the country and the permanent stationing of NATO troops.

Bound by the same worry, the two Nordic countries have been working together. Finnish President Sauli Niinisto is expected to visit Sweden on Tuesday and Wednesday.

Andersson said Sweden's membership application submission will come at the same time as Finland's.

Finnish Foreign Minister Pekka Haavisto said earlier that it likely be on Wednesday.

NATO Secretary General Jens Stoltenberg suggested Sunday that the process for both countries to join will occur with unprecedented speed when he spoke at a joint press conference with German Foreign Minister Annalena Baerbock.

All 30 NATO members must ratify the application to approve a new member, which can take several months to a year.

Turkey has expressed reservations about Sweden and Finland's entry as they support the Kurdistan Workers' Party (PKK), which it views as a terrorist organization.

But Stoltenberg expressed confidence that Turkey has no intention to block their entries.

Concern exists that Russia may launch a military offensive in the interim between application and full membership when neither country is formally protected by the security bloc's collective defense guarantee.

The prospect of the Nordic countries becoming NATO members has already led Moscow to threaten to militarily reinforce the Baltic Sea region, including with nuclear weapons.

Stoltenberg said NATO will look into providing security assurances, including increasing its presence in the region.