Topic summary
History of the Philippines (1565–1898)

The history of the Philippines from 1565 to 1898 is known as the Spanish period, during which the Philippine Islands were ruled as the Captaincy General of the Philippines within the Spanish East Indies, initially under the Viceroyalty of New Spain, based in Mexico City, until the independence of the Mexican Empire from Spain in 1821. This resulted in direct Spanish control during a period of governmental instability there.
The first documented European contact with the Philippines was made in 1521 by Ferdinand Magellan during his , during which he was killed in the Battle of Mactan. Forty-four years later, a Spanish expedition led by Miguel López de Legazpi left modern Mexico and began the Spanish conquest of the Philippines in the late 16th century. Legazpi's expedition arrived in the Philippines in 1565, a year after an earnest intent to conquer the archipelago, during the reign of Philip II of Spain, whose name has since become the eponym of the entire archipelago and the modern state of the Philippines.
The Spanish period ended with the Philippine Revolution and the defeat of Spain by the United States during the Spanish–American War. The Treaty of Paris, signed on December 10, 1898, resulted in the cession of the Philippines to the United States and was followed by the Philippine–American War, which marked the beginning of the American colonial period in Philippine history.