Spanish East Indies together with the Spanish West Indies, were administered through the Viceroyalty of New Spain based in Mexico City. After Mexican independence, they were ruled directly from Madrid. As a result of the Spanish–American War in 1898, the Philippines and Guam were occupied by the United States while about 6,000 of the remaining smaller islands were sold to Germany in the German–Spanish Treaty of 1899. The few remaining islands were ceded to the United States when the Treaty of Washington was ratified in 1901. Spanish contact began on , when a Spanish expedition led by Ferdinand Magellan reached the Mariana Islands.
East Indies theatre of the French Revolutionary Wars squadron. A Portuguese mercantile presence existed in the Indian port of Goa, which was a source of concern to the British as it represented a weak point in the defenses of British India. Portugal also controlled the Chinese port of Macau and a number of trading posts on the East African coast in Portuguese Mozambique. Other European nations, including Denmark and Sweden traded in the East Indies, as increasingly did American merchant ships. The East Indies were very important to the British war effort due to their pivotal position in maintaining British revenue through trade. The EIC controlled the shipment