# History of the Philippines (900–1565)

The recorded pre-colonial history of the Philippines begins with the creation of the Laguna Copperplate Inscription in 900 and ends with the beginning of Spanish colonization in 1565. The inscription records its date of creation in 822 Saka (900 CE). The discovery of this document marks the end of the prehistory of the Philippines at 900 AD. During this historical time period, the Philippine archipelago was home to numerous kingdoms and sultanates and was a part of the Indosphere and Sinosphere.
Sources of precolonial history include archeological findings; records from contact with the Song dynasty, the Brunei Sultanate, Korea, Japan, and Muslim traders; the genealogical records of Muslim rulers; accounts written by Spanish chroniclers in the 16th and 17th centuries; and cultural patterns that at the time had not yet been replaced through European influence.

## Societal categories

Early Philippine society was composed of such diverse subgroups as e.g., fishermen, farmers and hunter/gatherers, with some living in mountainside swiddens, some on houseboats and some in commercially developed coastal ports. Some subgroups were economically self-sufficient, and others had symbiotic relationships with neighboring subgroups.$^{:138}$ Society can be classified into four categories as follows:$^{:139}$
* Classless societies, societies with no terms which distinguish one social class from another;
* Warrior societies, societies with a recognized class distinguished by prowess in battle;
* Petty plutocrats, societies with a recognized class characterized by inherited real property; and
* Principalities, societies with a recognized ruling class with inherited rights to assume political office, or exercise central authority

## Social classes

The fourth societal category above can be termed the datu class, and was a titled aristocracy.$^{:150–151}$
The early polities were typically made up of three-tier social structure: a nobility class, a class of "freemen", and a class of dependent debtor-bondsmen:
* Datu (ruling class) and Maginoo (noble class, where the datu ascends from)
* Maharlika/Timawa (freemen; warrior class)
* Alipin (dependent class), classified into aliping namamahay (serfs) and aliping saguiguilid (slaves)

## Laguna Copperplate Inscription

The Laguna Copperplate Inscription (LCI) is the earliest record of a Philippine language and the presence of writing in the islands. The document measures around 20 cm by 30 cm and is inscribed with ten lines of writing on one side.

### Text

The text of the LCI was mostly written in Old Malay with influences of Sanskrit, Tamil, Old Javanese and Old Tagalog using the Kawi script. Dutch anthropologist Antoon Postma deciphered the text. The date of the inscription is in the "Year of Saka 822, month of Vaisakha", corresponding to April–May in 900 AD.
The text notes the acquittal of all descendants of a certain honorable Namwaran from a debt of 1 kati and 8 suwarna, equivalent to 926.4 grams of gold, granted by the Military Commander of Tundun (Tondo) and witnessed by the leaders of Pailah, Binwangan and Puliran, which are places likely also located in Luzon. The reference to the contemporaneous Medang Kingdom in modern-day Indonesia implies political connections with territories elsewhere in the Maritime Southeast Asia.

## Politics
### Emergence of Independent polities

Early settlements, referred to as barangays, ranged from 20 to 100 families on the coast, and around 150–200 people in more interior areas. Coastal settlements were connected over water, with much less contact occurring between highland and lowland areas. By the 1300s, a number of the large coastal settlements had emerged as trading centers, and became the focal point of societal changes. Some polities had exchanges with other states across Asia.
Polities founded in the Philippines from the 10th–16th centuries include Maynila, Tondo, Namayan, Kumintang, Pangasinan, Caboloan, Cebu, Butuan, Maguindanao, Buayan, Lanao, Sulu, and Ma-i. Among the nobility were leaders called datus, responsible for ruling autonomous groups called barangay or dulohan. When these barangays banded together, either to form a larger settlement or a geographically looser alliance group, the more esteemed among them would be recognized as a "paramount datu", rajah, or sultan which headed the community state. There is little evidence of large-scale violence in the archipelago prior to the 2nd millennium AD, and throughout these periods population density is thought to have been low.
Pre-colonial polities in the Philippine archipelago :
| Polity / Kingdom | Period | Today part of |
| Ijang | Unknown – 1790 | Batanes |
| Lawan | Unknown –1605 | Samar, parts of Eastern Visayas |
| Samtoy | Unknown – 1572 | Ilocos Region |
| Ibalon | Unknown – 1573 | Bicol Region |
| Kumintang | Unknown – 1581 | Batangas City |
| Taytay | Unknown – 1623 | Northern Palawan |
| Cainta | Unknown – 1571 | Rizal |
| Bo-ol | Unknown –1595 | Bohol, parts of Northern Mindanao |
| Tondo | Before 900 – 1589 | Manila, parts of Central Luzon, Calabarzon and Bicol |
| Ma-i | Before 971 – c. 1339 | Mindoro Island, parts of Southern Luzon |
| Sanmalan | Before 982 – 1500s | Zamboanga |
| Butuan | Before 989 – 1521 | Butuan, parts of Northern Mindanao and Caraga |
| Caboloan | Before 1225 – 1572 | San Carlos City, Pangasinan |
| Sandao | Before 1225 – c. 1300s | Calamian, Palawan, and parts of Luzon |
| Namayan | Before the 11th century–1571 | Manila, parts of Calabarzon |
| Madja-as | After the 11th century | Western Visayas |
| Pulilu | Before 1225 – 1571 | Polillo, Quezon |
| Pangasinan | Before 1225 – 1576 | Pangasinan, parts of Northern Luzon |
| Lubao | 14th century – 1571 | Pampanga |
| Sultanate of Buayan | c. 1350-1905 | Parts of Maguindanao del Norte, Maguindanao del Sur, Cotabato, South Cotabato and General Santos City |
| Sugbu | c. 1400–1565 | Cebu, parts of Central Visayas |
| Sultanate of Sulu | 1457–1915 | Sulu Archipelago, parts of Southern Palawan, Sabah, North and East Kalimantan in north-eastern Borneo |
| Maynila | c.1500–1571 | Manila, parts of Central Luzon |
| Sultanate of Maguindanao | 1515–1899 | Maguindanao, parts of Bangsamoro, Zamboanga Peninsula, Northern Mindanao, Soccsksargen and Davao Region |
| Confederate States of Lanao | 1616 – Present | Lanao, parts of Bangsamoro |

### Other political systems by ethnic group
#### In Luzon

In the Cagayan Valley, the head of the Ilongot city-states was called a benganganat, while for the Gaddang it was called a mingal.
The Ilocano people in northwestern Luzon were originally located in modern-day Ilocos Sur and were led by a babacnang. Their polity was called samtoy which did not have a royal family but, rather, was a collection of certain barangays (chiefdoms).

#### In Mindanao

The Lumad people from inland Mindanao are known to have been headed by a datu.
The Subanon people in the Zamboanga Peninsula were ruled by a timuay until they were overcome by the Sultanate of Sulu in the 13th century.
The Sama-Bajau people in Sulu who were not Muslims nor affiliated with the Sultanate of Sulu were ruled by a nakurah before the arrival of Islam.

### Trade

Trade with China is believed to have begun during the Tang dynasty, but grew more extensive during the Song dynasty. By the 2nd millennium CE, some Philippine polities were known to have sent trade delegations which participated in the Tributary system enforced by the Chinese imperial court, trading but without direct political or military control. The items much prized in the islands included jars, which were a symbol of wealth throughout South Asia, and later metal, salt and tobacco. In exchange were traded feathers, rhino horns, hornbill beaks, beeswax, bird's-nests, resin, and rattan.

## Indian influence

Indian cultural traits, such as linguistic terms and religious practices, began to spread within the Philippines during the 10th century, likely via the Hindu Majapahit empire.

### Writing systems

Brahmic scripts reached the Philippines in the form of the Kawi script, and later the Baybayin writing system. The Laguna Copperplate Inscription was written using the Kawi script.

#### Baybayin

By the 13th or 14th century, the baybayin script was used for the Tagalog language. It spread to Luzon, Mindoro, Palawan, Panay and Leyte, but there is no proof it was used in Mindanao.
There were at least three varieties of baybayin in the late 16th century. These are comparable to different variations of Latin which use slightly different sets of letters and spelling systems.
In 1521, the chronicler Antonio Pigafetta from the expedition of Ferdinand Magellan noted that the people that they met in Visayas were not literate. However, in the next few decades the Baybayin script seemed to have been introduced to them. In 1567 Miguel López de Legaspi reported that "they [the Visayans] have their letters and characters like those of the Malays, from whom they learned them; they write them on bamboo bark and palm leaves with a pointed tool, but never is any ancient writing found among them nor word of their origin and arrival in these islands, their customs and rites being preserved by traditions handed down from father to son without any other record."

## Earliest documented Chinese contact

The earliest date suggested for direct Chinese contact with the Philippines was 982. At the time, merchants from "Ma-i" (now thought to be either Bay, Laguna on the shores of Laguna de Bay, or a site called "Mait" in Mindoro) brought their wares to Guangzhou and Quanzhou. This was mentioned in the History of Song and Wenxian Tongkao by Ma Duanlin which were authored during the Yuan Dynasty.

## Arrival of Islam
### Beginnings

Muslim traders introduced Islam to the then-Indianized Malayan empires around the time that wars over succession had ended in the Majapahit Empire in 1405. However, by 1380 Makhdum Karim had already brought Islam to the Philippine archipelago, establishing the Sheik Karimal Makdum Mosque in Simunul, Tawi-Tawi, the oldest mosque in the country. By the 15th century, Islam was established in the Sulu Archipelago and spread from there. Subsequent visits by Arab, Malay and Javanese missionaries helped spread Islam further in the islands.
The Sultanate of Sulu once encompassed parts of modern-day Indonesia, Malaysia and the Philippines. Its royal house claims descent from Muhammad.

## Spanish expeditions

The following table summarizes expeditions made by the Spanish to the Philippine archipelago.
Spanish expeditions reaching the Philippine archipelago :
| Year | Leader | Ships | Landing |
| 1521 | / Ferdinand Magellan | Trinidad, San Antonio, Concepcion, Santiago and Victoria | Homonhon, Limasawa, Cebu |
| 1525 | García Jofre de Loaísa | Santa María de la Victoria, Sancti Spiritus, Anunciada, San Gabriel, Santa María del Parral, San Lesmes, and Santiago | Surigao, Visayas, Mindanao |
| 1527 | Álvaro de Saavedra Cerón | Florida, Santiago, and Espiritu Santo | Mindanao |
| 1542 | Ruy López de Villalobos | Santiago, Jorge, San Antonio, San Cristóbal, San Martín, and San Juan | Samar, Leyte, Saranggani |
| 1564 | Miguel López de Legazpi | San Pedro, San Pablo, San Juan and San Lucas | first landed on Samar, established colonies as part of Spanish Empire |

### First expedition

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 European expedition to the Philippine archipelago was led by the Portuguese navigator Ferdinand Magellan in the service of King Charles I of Spain in 1521.
The Magellan expedition sighted the mountains of Samar at dawn on March 17, 1521, making landfall the following day at the small, uninhabited island of Homonhon at the mouth of Leyte Gulf. On Easter Sunday, March 31, 1521, in the island of Mazaua, Magellan planted a cross on the top of a hill overlooking the sea and claimed the islands he had encountered for the King of Spain, naming them Archipelago of Saint Lazarus as stated in "First Voyage Around The World" by his companion, the chronicler Antonio Pigafetta.
Magellan sought alliances among the people in the islands beginning with Datu Zula of Sugbu (Cebu) and took special pride in converting them to Christianity. Magellan got involved in the political conflicts in the islands and took part in a battle against Lapulapu, chief of Mactan and an enemy of Datu Zula.
At dawn on April 27, 1521, Magellan with 60 armed men and 1,000 Visayan warriors had great difficulty landing on the rocky shore of Mactan where Lapulapu had an army of 1,500 waiting on land. Magellan waded ashore with his soldiers and attacked Lapulapu's forces, telling Datu Zula and his warriors to remain on the ships and watch. Magellan underestimated the army of Lapulapu, and, grossly outnumbered, Magellan and 14 of his soldiers were killed. The rest managed to reboard the ships.
The battle left the expedition with too few crewmen to man three ships, so they abandoned the "Concepción". The remaining ships – "Trinidad" and "Victoria" – sailed to the Spice Islands in present-day Indonesia. From there, the expedition split into two groups. The Trinidad, commanded by Gonzalo Gómez de Espinoza tried to sail eastward across the Pacific Ocean to the Isthmus of Panama. Disease and shipwreck disrupted Espinoza's voyage and most of the crew died. Survivors of the Trinidad returned to the Spice Islands, where the Portuguese imprisoned them. The Victoria continued sailing westward, commanded by Juan Sebastián Elcano, and managed to return to Sanlúcar de Barrameda, Spain in 1522.

### Subsequent expeditions

After Magellan's expedition, four more expeditions were made to the islands, led by García Jofre de Loaísa in 1525, Sebastian Cabot in 1526, Álvaro de Saavedra Cerón in 1527, and Ruy López de Villalobos in 1542.
In 1543, Villalobos named the islands of Leyte and Samar Las Islas Filipinas in honor of Philip II of Spain, at the time Prince of Asturias.

### Conquest of the islands

Philip II became King of Spain on January 16, 1556, when his father, Charles V, abdicated both the Spanish and HRE thrones, the latter went to his uncle, Ferdinand I. On his return to Spain in 1559, the king ordered an expedition to the Spice Islands, stating that its purpose was "to discover the islands of the west". In reality its task was to conquer the Philippine islands.
On November 19 or 20, 1564, a Spanish expedition of a mere 500 men led by Miguel López de Legazpi departed Barra de Navidad, New Spain, arriving at Cebu on February 13, 1565. It was this expedition that established the first Spanish settlements. It also resulted in the discovery of the tornaviaje return route to Mexico across the Pacific by Andrés de Urdaneta, heralding the Manila galleon trade, which lasted for two and a half centuries.