following the transfer of the portuguese royal court to rio de janeiro and the subsequent opening of the ports to foreign ships, the united states was, in 1815, the first country to establish a consulate in brazil, more precisely in recife, pernambuco. it was also the first nation to recognize brazil's 1822 declaration of independence from portugal in 1824. recognizing the independence of countries of the americas from their european metropolies was a policy of the united states, which hoped to undermine european influence in the region. during the 19th century and the first half of the 20th century, interaction between the two was limited to multilateral fora, such as the conference of american states. at the first pan-american conference in 1890, many countries of the americas, the u.s. and brazil included, discussed a series of regional integration projects. those ranged from military to economic integration. the united states planned to create a pan-american, anti-european economic bloc, a customs union. it meant to suspend external tariffs applied to inter-american trade but not to european-american trade.