quality:corruption
Foreign relations

Upon independence from Portugal, the immediate focus of Brazil's foreign policy was to gain widespread international recognition. There is no consensus about which countries were the first to recognize the independence of Brazil. According to historian Toby Green, they were the African states of Dahomey and Onim in 1822 and 1823 respectively while researcher Rodrigo Wiese Randig argues that it was the United Provinces of the Río de la Plata around June 1823, followed by the United States in May 1824, and the Kingdom of Benin in July 1824. Other nations followed in establishing diplomatic relations over the next few years. Portugal recognized the separation in August 1825. The Brazilian government subsequently made it a priority to establish its international borders through treaties with its neighbors. The task of securing recognized frontiers was complicated by the fact that, between 1777 and 1801, Portugal and Spain had annulled their previous treaties setting out the borders between their American colonial empires. However, the Empire was able to sign several bilateral treaties with neighbors, including Uruguay (1851), Peru (1851 and 1874), the Republic of New Granada (later Colombia, 1853), Venezuela (1859), Bolivia (1867) and Paraguay (1872). By 1889, most of its borders were firmly established. The remaining issues—including the purchase of the region of Acre from Bolivia which would give Brazil its present-day configuration —were only finally resolved after the country became a republic.

A number of conflicts occurred between the Empire and its neighbors. Brazil experienced no serious conflicts with its neighbors to the north and west, due to the buffer of the nearly impenetrable and sparsely populated Amazonian rainforest. In the south, however, the colonial disputes inherited from Portugal and Spain over the control of the navigable rivers and plains which formed the frontiers continued after independence. The lack of mutually agreed borders in this area led to several international conflicts, from the Cisplatine War to the Paraguayan War.

"Brazil is, next to ourselves, the great power on the American continent", affirmed James Watson Webb, the U.S. minister to Brazil, in 1867. The Empire's rise was noticed as early as 1844 by John C. Calhoun, the U.S. secretary of state: "Next to the United States, Brazil is the most wealthy, the greatest and the most firmly established of all the American powers." By the early 1870s, the international reputation of the Empire of Brazil had improved considerably, and it remained well-regarded internationally until its end in 1889. Christopher Columbus Andrews, an American diplomat in the Brazilian capital in the 1880s, later recalled Brazil as an "important Empire" in his memoirs. In 1871, Brazil was invited to arbitrate the dispute between the United States and Britain which became known as the Alabama Claims. In 1880, the Empire acted as arbiter between the United States and France over the damage caused to U.S. nationals during the French intervention in Mexico. In 1884, Brazil was called upon to arbitrate between Chile and several other nations (namely France, Italy, Britain, Germany, Belgium, Austria-Hungary and Switzerland) over damages arising from the War of the Pacific.

The Brazilian government eventually felt confident enough to negotiate a trade deal with the United States in 1889, the first to be undertaken with any nation since the disastrous and exploitative trade treaty with Britain in 1826 (canceled in 1844). American historian Steven C. Topik said that Pedro II's "quest for a trade treaty with the United States was part of a grander strategy to increase national sovereignty and autonomy." Unlike the circumstances of the previous pact, the Empire was in a strong position to insist on favorable trade terms, as negotiations occurred during a time of Brazilian domestic prosperity and international prestige.