Between the 7th to 10th centuries AD, the Cham polities rose to become a naval power; as Champan ports attracted local and foreign traders, Champan fleets also controlled the trade in spices and silk in the South China Sea, between China, the Indonesian archipelago and India. They supplemented their income from the trade routes not only by exporting ivory and aloe, but also by engaging in piracy and raiding. However, the rising influence of Champa caught the attention of a neighbouring thalassocracy that considered Champa as a rival, the Javanese (Javaka, probably refers to Srivijaya ruler of Malay Peninsula, Sumatra and Java). In AD 767, the Tonkin coast was raided by a Javanese fleet (Daba) and Kunlun pirates, Champa was subsequently assaulted by Javanese or Kunlun vessels in AD 774 and AD 787. In AD 774 an assault was launched on Po-Nagar in Nha-trang where the pirates demolished temples, while in AD 787 an assault was launched on Phang-rang.