tried to direct exports out of Potosí. The system of corregimientos to mark the subdivisions of the territory was ended in 1782, and replaced with Intendencias by Charles III. The new system was intended to re-enforce the royal authority and promote centralization. Buenos Aires had the main intendencia, and the other cities provincial ones. In 1778 Cevallos reinstated the Real Audiencia of Buenos Aires, by creating a new one; he maintained the Real Audiencia at Cochabamba. The Consulate of Commerce of Buenos Aires was authorized that year, but legal difficulties prevented its being established until 1794. In 1766, Spain acquired the French colony on the Falkland Islands, called Port St. Louis; after assuming effective control in 1767, it placed the islands under a governor subordinate to the Buenos Aires colonial administration. The expulsion of the British settlement in 1770 brought the two countries to the brink of war but a peace treaty allowed the British to return from 1771 until 1776, with neither side relinquishing sovereignty. Decline By the nineteenth century, Buenos Aires was becoming more self-sufficient, producing about 600,000 head of cattle annually (of which about one quarter was consumed locally). The area was rapidly developing. But wars with Great Britain meant a great setback for the region's economy, as maritime communications were practically paralyzed. The Alto Peru region started to show resistance to continued support of the administration and defense of the Río de la Plata estuary; it provided the main support but its silver production at Potosí was declining. In the first years of the viceroyalty, around 75% of the expenses were covered with revenues from the north. The Alto Plata (mostly present-day Paraguay) also had problems with the Buenos Aires administration, particularly because of its keeping a monopoly on exports. The Napoleonic Wars on the Continent preoccupied the Spanish government and, after its defeat, Napoleon placed his brother Joseph on the Spanish throne. By 1805, Spain had to help France because of their 1795 alliance, and lost its navy to the British in the Battle of Trafalgar. The Spanish prime minister had warned the viceroyalty of the likelihood of a British invasion, saying it could not provide support to the city of Buenos Aires. On 27 June 1806, a British force of around 1,500 men under Col. William Carr Beresford successfully invaded Buenos Aires. Viceroy Rafael de Sobremonte had escaped to Córdoba. The British forces were