A viceroy is somebody who governs a country or province as a substitute for the monarch. The term derives from the Latin prefix vice-, meaning "in the place of" and roi, meaning king. A vicereine is a woman in a viceregal position, or a viceroy's wife.
For example, the kings of early modern Spain employed numerous viceroys to rule over various parts of their lands. In Europe, until the 18th century there were Viceroys of Aragon, Valencia, Catalonia, Sardinia, Sicily, Naples, and Portugal (1580-1640), while in the New World, there were viceroys in Mexico City to govern New Spain and in Lima, Peru to govern western South America. The New World territories under the control of viceroys were known as Viceroyalties. Due to the growing size of Spain's American colonies, new viceroyalties were created for New Granada (1717) and Río de la Plata (1776).
In imperial China, viceroy was the English translation of the title "general supervisor-protector" (督護 or 總督) of Chinese officials heading some large administrative divisions. For instance, there was a viceroy of the two Guangs (Guangdong and Guangxi, a viceroy of Hukwang (the combination of the provinces of Hubei and Hunan). Li Hongzhang was viceroy of Hukwang from 1867 to 1870.
On the other hand, the Viceroyalty of Peru required all commerce to be performed through Lima's port, which restrained the Buenos Aires natural port potential economy, a problem that also caused large contraband activities in the region, especially in Asunción, Buenos Aires and Montevideo.
For instance, in the first years of the viceroyalty, around 75% of the expenses were covered with revenues that came from the north.
By 1805, Spain had to help France because of their 1795 alliance, and had lost its navy in the Battle of Trafalgar, but the Spanish prime minister had warned the viceroyalty of the likelihood of a British invasion, and that in such an event the city of Buenos Aires would be on its own.