Junks had been traveling to the islands from China for centuries and some islands and ports had roles in the international spice trade. The southern islands of the Philippines had become partly Islamized since the 15th century from Brunei to Mindanao and the Sulu islands.
Both Spain and Portugal had become active in the Southeast Asian region by the late 15th century, attracted by the valuable spice trade, access to the markets of China, and the possibility of converting souls to Christianity.
Relations between Spain and Portugal were regulated by the Treaty of Tordesillas in 1494, which divided lands outside Europe between the two powers. This division was further regulated by the Treaty of Saragossa in 1529, which fixed the exact line in the Pacific at 17 degrees east of the Moluccas Islands.
A Spanish explorer, Ferdinand Magellan, arrived a Cebu (part of the chain that became the Philippines) across the Pacific from the Western Hemisphere in 1521. In 1565, the first permanent Spanish settlement was established on Cebu. Manila was established in 1571; it became the capital of Spanish-ruled Philippines.
The spread of Spanish influence occurred quickly and peaceably, since there were few large communities able to resist the superior technology and organization, except for the Islamized states in the south, especially Mindanao. None of the desired spices were found in the Philippines.
The colonization was, consequently, of only limited success from the Spanish perspective and the local cultural heritage partly replaced by European Christianity and agriculture and other economic activities were reorganized and surplus was exported to Spain. Spanish appointed governors replaced the indigenous rulers.
Local exports to Spain, however, were very secondary to Chinese-made goods that Chinese merchants took to Manila, as they had been doing since the end of the first millennium c.e.
These goods, primarily silk textiles, tea, and porcelain, were in great demand in Europe, with the result that Manila became the gathering place of Spanish galleons that would sail in convoy annually to ports on the Pacific coast in southern Mexico, whence they would be carried across the isthmus by Mexican porters to Veracruz, a port in the Gulf of Mexico, and loaded onto ships for transport across the Atlantic to Spain. Thus the Philippines were more important to Spain as a gathering place for goods made in China and secondarily from Japan than for its own products.
As a result of Spanish rule until the end of the 19th century, the Philippines is the only Asian country with a majority Catholic population.