The main purpose of the Monroe Doctrine in 1823 was to prevent further British colonization of territories in the Western Hemisphere. This doctrine was devised by John Quincy Adams in response to the fear that European powers would attempt to reestablish control over their colonies that had declared independence in the 1820s. The Monroe Doctrine allowed European countries to keep their already established colonies but prevented them from establishing new ones. The U.S. promised to keep out of foreign affairs and the Monroe Doctrine became the foundation of U.S. foreign policy.