For its first few years, NATO was not much more than a political association. However, the Korean War galvanized the member states, and an integrated military structure was built up under the direction of two US supreme commanders. The course of the Cold War led to a rivalry with nations of the Warsaw Pact, which formed in 1955. The first NATO Secretary General, Lord Ismay, stated in 1949 that the organization's goal was "to keep the Russians out, the Americans in, and the Germans down." Doubts over the strength of the relationship between the European states and the United States ebbed and flowed, along with doubts over the credibility of the NATO defence against a prospective Soviet invasion—doubts that led to the development of the independent French nuclear deterrent and the withdrawal of the French from NATO's military structure in 1966.
After the fall of the Berlin Wall in 1989, the organization became drawn into the breakup of Yugoslavia, and conducted their first military interventions in Bosnia from 1992 to 1995 and later Yugoslavia in 1999. Politically, the organization sought better relations with former Cold War rivals, which culminated with several former Warsaw Pact states joining the alliance in 1999 and 2004. The September 2001 attacks signalled the only occasion in NATO's history that Article 5 of the North Atlantic treaty has been invoked as an attack on all NATO members. After the attack, troops were deployed to Afghanistan under the NATO-led ISAF, and the organization continues to operate in a range of roles, including sending trainers to Iraq, assisting in counter-piracy operations and most recently in 2011 enforcing a no-fly zone over Libya in accordance with UN Security Council Resolution 1973. The less potent Article 4, which merely invokes consultation among NATO members has been invoked three times, and only by Turkey: once in 2003 over the Second Iraq War, and twice in 2012 over the Syrian civil war after the downing of an unarmed Turkish F-4 reconnaissance jet and after a mortar was fired at Turkey from Syria.
For more information see NATO