The 19th century formed the roots of United States foreign interventionism, which at the time was largely driven by economic opportunities in the Pacific and Spanish-held Latin America along with the Monroe Doctrine, which saw the U.S. seek a policy to resist European colonialism in the Western hemisphere. The 20th century saw the U.S. intervene in two world wars in which American forces fought alongside their allies in international campaigns against Imperial Japan, Imperial and Nazi Germany, and their respective allies. The aftermath of the Second World War resulted in a foreign policy in which the U.S. sought to oppose world communism.