During the Napoleonic Wars of 1801–1815, Spain was allied with Napoleon and its colonies were now a potential target for the Royal Navy. The result was two British invasions of the River Plate. British Admiral Home Riggs Popham launched an invasion of the Spanish colony of La Plata (modern-day Argentina). Popham had an army of 1500 men, who quickly captured the fort at Buenos Aires, capturing the city of 55,000 inhabitants. Argentine creoles (that is, native-born men of Spanish descent) mobilized their local and nearby forces, including 1,000 soldiers from the nearby city of Montevideo. They overpowered the British, who surrendered on August 14, 1806. In response London sent new armies to Buenos Aires and Valparaiso. The second British attack came in 1807, as British General John Whitelocke brought 12,000 soldiers for his invasions of Montevideo and Buenos Aires. The decisive battle came in June 1807; the Argentines were outnumbered 12,000 to 9,000. They nevertheless prevailed and the British again surrendered. Meanwhile, Napoleon invaded Portugal, and the Royal Navy rescued the royal family taking it to Brazil. The great British naval victory at Trafalgar in October 1805 decisively gave control of the oceans to the British, and ended Napoleonic overseas dreams.