Because Peru discovered that Ecuador and Colombia neglected to effectively control their Amazonian territories during their colonial era, Peru decided to back its de jure titles with de facto possession by setting up military posts in the relatively isolated trading villages and then flooding the disputed area with Peruvian colonists. The only problem lay with the expanding ambitions of Brazil, since it had slowly settled its part of the disputed area with colonists throughout its colonial era; it had a trading relationship with the Spanish-speaking trading posts and villages along the Marañon River. To neutralize Brazil from impeding Peru's planned colonization project, on 23 October 1851, Peru peacefully settled its disputes with Brazil and both countries agreed to a bilateral free navigation and friendly trade along the Amazon River.