<Tr> <Td> <Ul> <Li> </Li> <Li> </Li> <Li> </Li> </Ul> </Td> </Tr> <Ul> <Li> </Li> <Li> </Li> <Li> </Li> </Ul> <P> The history of the Philippines from 1521 to 1898, also known as the Spanish colonial period, a period that spans during the Captaincy General of the Philippines located in the collection of Islands in Southeast Asia that was colonized by Spain known as' Las Islas Filipinas', once under New Spain until Mexican independence which gave Madrid direct control over the area . It was also known as Spanish East Indies to the colonialist . It started 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 ended with the outbreak of the Philippine Revolution in 1898, which marked the beginning of the American colonial era of Philippine history . </P> <P> Although the archipelago may have been visited before by the Portuguese (who conquered Malacca City in 1511 and reached Maluku Islands in 1512), 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 Mazaua (today believed to be Limasawa island in Southern Leyte) as is stated in Antonio 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 . </P>

How long did the spanish colonized the philippines
find me the text answering this question