The history of the Philippines from 1521 to 1898, also known as the Spanish Colonial Era or period of time, begins with the arrival in 1521 of European explorer Ferdinand Magellan sailing for Spain, which heralded the period when the Philippines was a colony of the Spanish Empire, and ends with the outbreak of the Spanish–American War in 1898, which marked the beginning of the American Colonial Era of Philippine history.
Although the archipelago may have been visited before by the Portuguese, the earliest documented European expedition to the Philippines was that led by Ferdinand Magellan, in the service of the king of Spain. The expedition first sighted the mountains of Samar at dawn on the 16th March 1521, making landfall the following day at the small, uninhabited island of Homonhon at the mouth of the Leyte Gulf. On Easter Sunday, 31 March 1521, at Limasawa Island, Southern Leyte, as is stated in Pigafetta's Primo Viaggio Intorno El Mondo (First Voyage Around the World), Magellan solemnly planted a cross on the summit of a hill overlooking the sea and claimed for the king of Spain possession of the islands he had seen, naming them Archipelago of Saint Lazarus.
Magellan conquered and sought alliances among the natives beginning with Datu Zula, the chieftain of Sugbu (now Cebu), and took special pride in converting them to Catholicism. Magellan's expedition got involved in the political rivalries between the Cebuano natives and took part in a battle against Lapu-lapu, chieftain of Mactan island and a mortal enemy of Datu Zula. At dawn on 27 April 1521, Magellan invaded Mactan Island with 60 armed men and 1,000 Cebuano warriors, but had great difficulty landing his men on the rocky shore. Lapu-Lapu had an army of 1,500 on land. Magellan waded ashore with his soldiers and attacked the Mactan defenders, ordering Datu Zula and his warriors to remain aboard the ships and watch. Magellan seriously underestimated Lapu-Lapu and his men, and grossly outnumbered, Magellan and 14 of his soldiers were killed. The rest managed to reboard the ships. (See Battle of Mactan)