The reason most countries join NATO is because of Article 5 of the North Atlantic Treaty, which stipulates that all signatories consider an attack on one member an attack against all.
Article 5 has been a cornerstone of the alliance since it was founded in 1949 as a counterweight to the Soviet Union.
The point of the treaty, and Article 5 specifically, was to deter the Soviets from attacking liberal democracies that lacked military strength.
Article 5 guarantees that the resources of the whole alliance -- including the massive US military -- can be used to protect any single member nation, such as smaller countries that would be defenseless without their allies. Iceland, for example, has no standing army.
Former Swedish leader Carl Bildt told CNN didn't foresee new big military bases being built in either country if they joined. He said joining the alliance would probably mean more joint military training and planning between Finland, Sweden and the 30 current members.
Swedish and Finnish forces could also participate in other NATO operations around the globe, such as those in the Baltic states, where several bases have multinational troops.
"There's going to be preparations for contingencies as part of deterring any adventures that the Russians might be thinking of," Bildt said. "The actual change is going to be fairly limited."
Why haven't Finland and Sweden already joined NATO?
While other Nordic countries like Norway, Denmark and Iceland were original members of the alliance, Sweden and Finland did not join the pact for historic and geopolitical reasons.
Both Finland, which declared independence from Russia in 1917 after the Bolshevik revolution, and Sweden adopted neutral foreign policy stances during the Cold War, refusing to align with either the Soviet Union or the United States.
Sweden's policy of neutrality goes back to the early 1800s, when the country steadfastly stayed out of European conflicts. Its King Gustav XIV formally adopted that neutral status in 1834, according to NATO, and Sweden declared a policy of "non-belligerency" during World War II -- allowing Nazi troops to pass through its land into Finland, while also accepting Jewish refugees.
Sweden opted to maintain its neutral status after the war ended.
Finland's neutrality has historically proved more difficult, as it shared a long border with an authoritarian superpower.
A Finno-Soviet treaty known as the Agreement of Friendship, signed in 1948 and extended on occasion through the decades, prohibited Finland from joining any military alliance considered hostile to the USSR, or from allowing a Western attack through Finnish territory.
To keep the peace, Finns adopted an arrangement sometimes called Finlandization, in which leaders acceded to Soviet demands from time to time. The term was coined during the Cold War and has been applied to other countries in which a superpower exerts control over smaller neighboring states.
Both countries' balancing acts effectively ended with the collapse of the Soviet Union. Sweden and Finland joined the European Union together in 1995 and gradually aligned their defense policies with the West, while still avoiding joining NATO outright.
How Russia's invasion changed everything
Sweden and Finland have been inching toward the West on security issues since joining the EU shortly after the end of the Cold War. But Russia's invasion of Ukraine dramatically accelerated that process, pushing them to pull the trigger on NATO membership.
If the Kremlin was willing to invade Ukraine -- a country with 44 million people, a GDP of about $516 million, and armed forces of 200,000 active troops -- what would stop Putin from invading smaller countries like Finland or Sweden?
"Everything changed when Russia invaded Ukraine," Finnish Prime Minister Sanna Marin said in April. "People's mindset in Finland, also in Sweden, changed and shifted very dramatically."
Since the invasion of Ukraine in February, Finnish public support for joining NATO has leaped from around 30% to nearly 80% in some polls. The majority of Swedes also approve of their country joining the alliance, according to opinion polls there.
How has Russia reacted?
Russia lambasted the May decision by Finland and Sweden to seek to join the alliance. Its Deputy Foreign Minister, Sergei Ryabkov, said at the time that the move would be a "mistake" with "far-reaching consequences," according to Russian state news agency TASS.
That followed similar threats from high-ranking Moscow officials. Kremlin spokesman Dmitry Peskov said after the announcement that "NATO expansion does not make the world more stable and secure."
He added that Russia's reaction would depend on "how far and how close to our borders the military infrastructure will move."
Russia currently shares about 755 miles of land border with five NATO members, according to the alliance. Finland's accession would mean that a nation with which Russia shares an 830-mile border would become formally militarily aligned with the United States.
The addition of Finland and Sweden would also benefit the alliance, which would frustrate Russia. Both are serious military powers, despite their small populations.
But Putin has so far been more muted in his rhetoric than some of his officials. Last month he said that "Russia has no problems with these states," adding that the expansion of NATO "does not pose a direct threat to Russia."
"But the expansion of military infrastructure into this territory will certainly cause our response," he added at the Collective Security Treaty Organization in Moscow. "We will see what it will be based on the threats that will be created for us."
Why is Russia so opposed to NATO?
Putin sees the alliance as a defense against Russia, despite the fact that it spent much of the post-Soviet era focusing on issues like terrorism and peacekeeping.
Before Putin invaded Ukraine, he made clear his belief that NATO had edged too close to Russia and should be stripped back to its borders of the 1990s, before some countries that either neighbor Russia or were ex-Soviet states joined the military alliance.
Ukraine's desire to join NATO, and its status as a NATO partner -- seen as a step on the way to eventual full membership -- was one of the numerous grievances Putin cited in an attempt to justify the invasion.
Ironically, his invasion has given the alliance new purpose -- and increased its strength.