The ancestors of the Cham probably migrated from the island of Borneo. Records of the Champa kingdom go as far back as second century AD. At its height in the 9th century, the kingdom controlled the lands between what is now modern Huế, to the northern reaches of theMekong Delta in southern Vietnam. Its prosperity came from maritime trade in sandalwood and slaves and probably included piracy.