Before the arrival of the Spanish, Filipinos lived in kinship-based communities called barangays led by local chiefs called datus. They engaged in farming, fishing, and hunting. Lowlanders lived near the coast while highlanders lived inland away from access to water. There was no formal religion but animist beliefs were common. Beginning in the 9th century, foreign traders from China and Arabs who introduced Islam arrived to trade goods like porcelain, silk, and metal wares in exchange for gold, pearls, and medicinal plants. Advanced iron tools led to more organized social structures and writing developed, as evidenced by the earliest known Philippine artifact, the Laguna Copperplate Inscription from 900 AD.