Bali was inhabited by around 2000 BC by Austronesian peoples who migrated originally from Taiwan through Maritime Southeast Asia. Culturally and linguistically, the Balinese are thus closely related to the peoples of the Indonesian archipelago, Malaysia, the Philippines, and Oceania. Stone tools dating from this time have been found near the village of Cekik in the island's west. In ancient Bali, nine Hindu sects existed, namely Pasupata, Bhairawa, Siwa Shidanta, Waisnawa, Bodha, Brahma, Resi, Sora and Ganapatya. Each sect revered a specific deity as its personal Godhead. Balinese culture was strongly influenced by Indian, Chinese, and particularly Hindu culture, beginning around the 1st century AD. The name Bali dwipa ("Bali island") has been discovered from various inscriptions, including the Blanjong pillar inscription written by Sri Kesari Warmadewa in 914 AD and mentioning "Walidwipa". It was during this time that the complex irrigation system subak was developed to grow rice. Some religious and cultural traditions still in existence today can be traced back to this period. The Hindu Majapahit Empire (1293–1520 AD) on eastern Java founded a Balinese colony in 1343. When the empire declined, there was an exodus of intellectuals, artists, priests, and musicians from Java to Bali in the 15th century.
Indonesia's wealth in spices, precious stones, gold and other exotic items have attracted traders for centuries. The islands in the Indonesian Archipelago were natural way stations on the trade routes between the Middle East, India and China. The Balinese were never an active seafaring people. It was the Chinese, Indians, Arabs, Malays, Javanese and Bunganese who plied the trade routes. Later came the Portuguese, English and Dutch.
Bali has no naturally protected harbors and the coastline is notoriously perilous. Many coastal villages profited routinely by plundering shipwrecks. One such incident provoked the Dutch invasion of 1906, which was relatively late in their 300 years of colonial rule in Indonesia. Despite the bloody conquest, Balinese culture was relatively undisturbed for most of the years of Dutch occupation, partly because Singaraja, in the north of the island, was the only place that ships could anchor in relative safety and travel in the interior of the island was difficult. Ships from all over South East Asia stopped to exchange goods in Singaraja but for the most part, before the advent of airplanes, only the inhabitants of the north end of the island were directly exposed to foreign influences. Nevertheless, the Dutch did exploit the island vigorously, siphoning off essential resources through an efficient and clever system that used the local aristocracy to do their bidding. After the Dutch, Bali endured an era of Japanese occupation during World War Two and then became part of an independent Indonesia. Under Presidents Sukarno and Suharto political loyalties continued to shift the balance of power. Technically the aristocracy and the Brahmins (priestly caste) no longer "rule" but in practice they still enjoy a large measure of power and privilege.