The Treaty of Madrid was an agreement concluded between Spain and Portugal on 13 January 1750. In an effort to end decades of conflict in the region of present-day Uruguay, the treaty established detailed territorial boundaries between Portuguese Brazil and the Spanish colonial territories to the south and west. Portugal also recognized Spain's claim to the Philippines while Spain acceded to the westward expansion of Brazil. Most notably, Spain and Portugal expressly abandoned the papal bull Inter caetera and the treaties of Tordesillas and Zaragoza as the legal basis for colonial division. Background See also Spanish–Portuguese War (1735–37) Earlier treaties such as the Treaty of Tordesillas and the Treaty of Zaragoza authored by both countries, and as mediated by Pope Alexander VI, stipulated that the Portuguese empire in South America could extend no farther west than 370 leagues west of Cape Verde Islands (called the Tordesillas meridian, approx. the 46th meridian). Had these treaties remained unchanged, the Spanish would have held both what is today the city of São Paulo and all land to the west and south. Thus, Brazil would be only a fraction of its present-day size. Gold was discovered in Mato Grosso in 1695. Starting in the 17th century, Portuguese explorers, traders, and missionaries from the state of Maranhao in the north, and gold-seekers and slave-hunters, the famous bandeirantes of São Paulo, in the south, had penetrated far to the west and southwest of the old treaty-line also looking for slaves. New captaincies (administrative divisions) created by the Portuguese beyond Brazil's previously-established boundaries: Minas Gerais, Goias, Mato Grosso, Santa Catarina. National motivations Portugal The Portuguese wanted to strike a balance between the boundary claims of Spain and Portugal by allotting the greater part of the Amazon basin to the latter and that of the Rio de la Plata to the former. They also sought to secure the undisputed sovereignty of the gold and diamond districts of Goias and Mato Grosso for the Portuguese Crown as well as secure Brazil's frontier by the retention of the Rio Grande do Sul and the acquisition of the Spanish Jesuit missions ("Seven Peoples") on the left bank of the river Uruguay. They hoped that the meeting would allow them to secure the western frontier of Brazil and river communication with Maranhao-Para by ensuring that navigation on the rivers Tocantins, Tapajos and Madeira remain in Portuguese hands Spain Spain instead was desirous