But only deterrence against attack on the member nations. NATO has no charter to deter attack anywhere else. From NATO's own website:
Safeguarding the freedom and security of its members
NATO's essential and enduring purpose is to safeguard the freedom and security of all its members by political and military means. Collective defence is at the heart of the Alliance, as set out in Article 5 of the Washington Treaty. NATO's greatest responsibility is to protect and defend Allied territory and populations against attack in a world where peace and security cannot be taken for granted.
Deterrence is a core element of NATO's overall strategy: preventing conflict and war, protecting Allies, maintaining freedom of decision and action, and upholding the principles and values it stands for – individual liberty, democracy, human rights and the rule of law. Free societies and the rules-based international order need to be backed by credible transatlantic defence.
NATO's capacity to deter and defend is supported by an appropriate mix of nuclear, conventional, and missile defence capabilities, which complement each other, and is underpinned by an array of civil and military resources to support these capabilities and the posture more broadly. NATO also maintains the freedom of action and flexibility to respond to the full spectrum of challenges with an appropriate and tailored approach.
The capitalized term "Allies" has a specific meaning and relates solely to those countries who are party to the NATO treaty. Other nations who align with NATO but are not signatories of the treaty are termed partners...and you'll note that "partners" does not appear in the description.