The US State Department's web site has this to say about the Monroe Doctrine: "In 1823, France invited Spain to restore the Bourbon power, and there was talk of France and Spain warring upon the new republics with the backing of the Holy Alliance (Russia, Prussia and Austria). This news appalled the British government -- all the work of Wolfe, Chatham and other eighteenth-century British statesmen to get France out of the New World would be undone, and France would again be a power in the Americas.
"George Canning, the British foreign minister, proposed that the United States and Great Britain join to warn off France and Spain from intervention. Both Jefferson and Madison urged Monroe to accept the offer, but [Secretary of State] John Quincy Adams was more suspicious. Adams also was quite concerned about Russia's efforts to extend its influence down the Pacific coast from Alaska south to California, then owned by Mexico.
"At the Cabinet meeting of November 7, 1823, Adams argued against Canning's offer, and declared, 'It would be more candid, as well as more dignified, to avow our principles explicitly to Russia and France, than to come in as a cockboat in the wake of the British man-of-war.'
"He argued and finally won over the Cabinet to an independent policy. In Monroe's message to Congress on December 2, 1823, he delivered what we have always called the Monroe Doctrine, although in truth it should have been called the Adams Doctrine. Essentially, the United States was informing the powers of the Old World that the American continents were no longer open to European colonization, and that any effort to extend European political influence into the New World would be considered by the United States 'as dangerous to our peace and safety.' The United States would not interfere in European wars or internal affairs, and expected Europe to stay out of American affairs.
"Although it would take decades to coalesce into an identifiable policy, John Quincy Adams did raise a standard of an independent American foreign policy so strongly that future administrations could not ignore it. One should note, however, that the policy succeeded because it met British interests as well as American, and for the next 100 years was secured by the backing of the British fleet."