The importance of Montevideo as the main port of the Viceroyalty of the Río de la Plata brought it in confrontations with the city of Buenos Aires in various occasions, including several times when it was taken over to be used as a base to defend the eastern province of the Viceroyalty from Portuguese incursions.