In 1778, Queen Maria I of Portugal and King Charles III of Spain signed the Treaty of El Pardo which ceded Bioko, adjacent islets, and commercial rights to the Bight of Biafra between the Niger and Ogoue rivers to Spain in exchange for large areas in South America that are now Western Brazil. Brigadier Felipe José, Count of Arjelejos sailed from Uruguay to formally take possession of Bioko from Portugal, landing on the island on 21 October 1778. After sailing for Annobón to take possession, the Count died of disease caught on Bioko and the fever-ridden crew mutinied. The crew landed on São Tomé instead where they were imprisoned by the Portuguese authorities after having lost over 80% of their men to sickness. As a result of this disaster, Spain was thereafter hesitant to invest heavily in its new possession. However, despite the setback Spaniards began to use the island as a base for slave trading on the nearby mainland. Between 1778 and 1810, the territory of what became Equatorial Guinea was administered by the Viceroyalty of the Río de la Plata, based in Buenos Aires.