The War of 1812 stirred a new nationalistic spirit in foreign affairs. In 1815, this spirit resulted in a decision to end the raids by the Barbary pirates on American commercial shipping in the Mediterranean. For 17 years the United States had paid tribute to the ruler of Algiers. In March 1815, Captain Stephen Decatur and a fleet of ten ships sailed into the Mediterranean, where they captured two Algerian gunboats, towed the ships into Algiers harbor, and threatened to bombard the city. As a result, all the North African states agreed to treaties releasing American prisoners without ransom, ending all demands for American tribute, and providing compensation for American vessels that had been seized.
After successfully defending American interests in North Africa, Monroe acted to settle old grievances with the British. Britain and the United States had left a host of issues unresolved in the peace treaty ending the War of 1812, including disputes over boundaries, trading and fishing rights, and rival claims to the Oregon region of the Pacific Northwest. The two governments moved quickly to settle these issues. The Rush-Bagot Agreement (1817) removed most military ships from the Great Lakes. In 1818, Britain granted American fishermen the right to fish in eastern Canadian waters, agreed to the 49th parallel as the boundary between the United States and Canada from Minnesota to the Rocky Mountains, and consented to joint occupation of the Oregon region.
The critical foreign policy issue facing the United States after the War of 1812 was the fate of Spain's crumbling New World empire. Many of Spain's New World colonies had taken advantage of turmoil in Europe during the Napoleonic Wars to fight for their independence. These revolutions aroused intense sympathy in the United States, but many Americans feared that European powers might restore monarchical order in Spain’s New World.
A source of particular concern was Florida, which was still under Spanish control. Pirates, fugitive slaves, and Native Americans used Florida as a sanctuary and as a jumping off point for raids on settlements in Georgia. In December 1817, to end these incursions, Monroe authorized General Andrew Jackson to lead a punitive expedition against the Seminole Indians in Florida. Jackson attacked the Seminoles, destroyed their villages, and overthrew the Spanish governor. He also court-martialed and executed two British citizens whom he accused of inciting the Seminoles to commit atrocities against Americans.
Jackson's actions provoked a furor in Washington. Spain protested Jackson's acts and demanded that he be punished. Secretary of War John C. Calhoun and other members of Monroe's cabinet urged the president to reprimand Jackson for acting without specific authorization. In Congress, Henry Clay called for Jackson's censure. Secretary of State Adams, however, saw in Jackson's actions an opportunity to wrest Florida from Spain.
Instead of apologizing for Jackson's conduct, Adams declared that the Florida raid was a legitimate act. Adams informed the Spanish government that it would either have to police Florida effectively or cede it to the United States. Convinced that American annexation was inevitable, Spain ceded Florida to the United States in the Adams-Onis Treaty of 1819. In return, the United States agreed to honor $5 million in damage claims by Americans against Spain. Under the treaty, Spain relinquished its claims to Oregon and the United States renounced, at least temporarily, its claims to Texas.
At the same time, European intervention in the Pacific Northwest and Latin America threatened to become a new source of anxiety for American leaders. In 1821, Russia claimed control of the entire Pacific coast from Alaska to Oregon and closed the area to foreign shipping. This development coincided with rumors that Spain, with the help of its European allies, was planning to reconquer its former colonies in Latin America. European intervention threatened British as well as American interests. Not only did Britain have a flourishing trade with Latin America, which would decline if Spain regained its New World colonies, but it also occupied the Oregon region jointly with the United States. In 1823, British Foreign Minister George Canning proposed that the United States and Britain jointly announce their opposition to further European intervention in the Americas.
Monroe initially regarded the British proposal favorably. But his secretary of state, John Quincy Adams, opposed a joint Anglo-American declaration. Secure in the knowledge that the British would use their fleet to support the American position, Adams convinced President Monroe to make an independent declaration of American policy. In his annual message to Congress in 1823, Monroe outlined the principles that have become known as the Monroe Doctrine. He announced that the Western Hemisphere was henceforth closed to any further European colonization, declaring that the United States would regard any attempt by European nations "to extend their system to any portion of this hemisphere as dangerous to our peace and safety." European countries with possessions in the hemisphere--Britain, France, the Netherlands, and Spain--were warned not to attempt expansion. Monroe also said that the United States would not interfere in internal European affairs.
For the American people, the Monroe Doctrine was the proud symbol of American hegemony in the Western Hemisphere. Unilaterally, the United States had defined its rights and interests in the New World. It is true that during the first half of the nineteenth century the United States lacked the military power to enforce the Monroe Doctrine and depended on the British navy to deter European intervention in the Americas, but the nation had clearly warned the European powers that any threat to American security would provoke American retaliation.
The Era of Good Feelings marked one of the most successful periods in American diplomacy. Apart from ending the attacks of the Barbary pirates on American shipping, the United States settled many of its disagreements with Britain, acquired Florida from Spain, defined its western and southwestern boundaries, convinced Spain to relinquish its claims to the Oregon region, and delivered a strong warning that European powers were not to interfere in the Western Hemisphere.