In 1773, the governor of Buenos Aires, D. Juan José Vertiz y Salcedo, with 5,000 men, left the region of the Prata River to expel the Portuguese from Rio Grande do Sul. Arriving in this area he asked Bernardo Lecocq to build the Fort of Santa Tecla, of which there are still ruins. The fort was surrounded by a ditch 9 meters wide and 2.5 meters deep, with a wall. This fort was sacked twice, the first in 1776 when Rafael Pinto Bandeira invaded and expelled the Spanish. After signing the Treaty of Santo Idelfonso in 1777 a Spanish garrison again occupied the fort now at the border between the two empires.