With the treaties of San Ildefonso in 1777 and El Pardo in 1778, during the reign of the Spanish King Charles III, the Portuguese gave to the Spanish the islands of Fernando Pó, Annobón, and the right to conduct trade in the mainland, an area of influence of approximately 800 000 km2 in Africa, in exchange for the Colonia del Sacramento in Río de la Plata and the Santa Catalina Island off the Brazilian coast (occupied by the Spaniards). The area stretched from the Niger Delta to the mouth of Ogüé River — in the current Gabon — and included, besides the islands of Fernando Pó and Annobón, the islets of Corisco and Elobeyes. Having failed its attempts to colonize these lands because they already had vast colonies in other parts of the world, Spain lost interest in Spanish Guinea in 1827 and authorized the British to use the island as a base for suppressing the slave trade.