The Treaty of Madrid (also known as the Treaty of Limits of the Conquests) 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. The treaty included a mutual guarantee of support in case either state's American colonies were attacked by a third power.

Soon after the signing of the treaty, two commissions for demarcation were created. The northern one was chaired by the State Governor of Grão-Pará and Maranhão, and the southern one by the Portuguese Governor of Rio de Janeiro.

Aftermath

thumb|right|[[Brazil according to the Treaty of Madrid of 1750, reaffirmed in the First Treaty of San Ildefonso of 1777.]]

The Treaty of Madrid was significant because it substantially defined the modern boundaries of Brazil. However, the resistance of the Jesuits to surrendering their missions, and the refusal of the Guaraní to be forcibly relocated, led to the nullification of the treaty by the subsequent Treaty of El Pardo, signed by both countries in 1761.

The opposition by the Guaraní led to the Guaraní War of 1756. There were frequent skirmishes in the Banda Oriental after the 1750 treaty.