 In the late 17th century, Portugal and Spain began the occupation of the Banda Oriental; they succeeded in founding Colonia del Sacramento in 1680, Montevideo in 1726, the Fuerte de San Miguel in 1737, and the Fortaleza de Santa Teresa in 1762.The Treaty of Madrid (1750) settled boundaries between the mouth of the creek Valizas and Cabo Polonio.By order of the Governor of Montevideo, José Joaquín de Viana, in 1751, frontier military posts were created, with colonial guards on both sides of the Chuy stream, the result of the discussions that had prevailed in the courts of the Spanish and Portuguese crowns.