Between 1680 and 1683, Portugal founded the city of Colonia do Sacramento in the region across the bay from Buenos Aires. This city met with no resistance from the Spanish until 1723, when they began to place fortifications on the elevations around Montevideo Bay. On 22 November 1723, Field Marshal Manuel de Freytas Fonsecs of Portugal built the Montevieu fort.
A Spanish expedition was sent from Buenos Aires, organized by the Spanish governor of that city, Bruno Mauricio de Zabala. On 22 January 1724, the Spanish forced the Portuguese to abandon the location and started populating the city, initially with six families moving in from Buenos Aires and soon thereafter by families arriving from the Canary Islands who were called by the locals "guanches", "guanchos" or "canarios". There was also one significant early Italian resident by the name of Jorge Burgues.
A census of the city's inhabitants was performed in 1724 and then a plan was drawn delineating the city and designating it as San Felipe y Santiago de Montevideo, later shortened to Montevideo. The census counted fifty families of Galician and Canary Islands origin, more than 1000 indigenous, mostly Guaraní and a number of Africans of Bantú origin as slaves.
A few years after its foundation, Montevideo became the main city of the region north of the Río de la Plata and east of the Uruguay River, competing with Buenos Aires for dominance in maritime commerce. 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.
In 1776, Spain made Montevideo its main naval base (Real Apostadero de Marina) for the South Atlantic, with authority over the Argentine coast, Fernando Po, and the Falklands.
Until the end of the 18th century, Montevideo remained a fortified area, today known as Ciudad Vieja.