The North Atlantic Treaty Organization was created in 1949 by the United States , Canada , and several Western European nations to provide collective security against the Soviet Union . NATO was the first peacetime military alliance the United States entered into outside of the Western Hemisphere .