Luzon was once split among Hindu-Buddhist kingdoms, Muslim principalities, and ethnoreligious tribes, who had trading connections with Borneo, Malaya, Java, Indochina, India, Okinawa, Japan and China before the Spanish established their rule. From just before the first millennium, the Tagalog and Kapampangan peoples of south and central Luzon had established several Indianized kingdoms, notably among them those of Tundok, Namayan and Maynila.