 In 1762, Spain entered the Seven Years' War on the side of France; while an invasion of Portugal ended in disaster, the Spanish captured Colonia del Sacramento, now in Uruguay and much of the modern day Brazilian state of Rio Grande do Sul.Colonia del Sacramento was returned to Portugal by the 1763 Treaty of Paris.Over the next decade, Portugal reoccupied Rio Grande do Sul in an undeclared war before formal hostilities commenced in the 1776-1777 Spanish–Portuguese War.