Spurred by Russia's war in Ukraine, it represents a seismic shift from long-held neutrality in Finland and Sweden.