Linyi 林邑 (Vietnamese reading Lâm Ấp), also called Zhanpo 占婆 (i.e. Champa, Chăm Pa), Zhanbo 占波, Zhanba 占八, Zhanba 蘸八, Zhanbulao 占不勞, Moheshanbo 摩訶贍波, Zhanbo 贍波 or Huanwang 環王, was a country or a group of states in what is today the central and southern parts of Vietnam. Its capital city was Zhancheng 占城 (the most common name), Zhanpobuluo 占婆補羅 (i.e. Champapura), or Yintuoluopuluo 因陀羅補羅 (i.e. Indrapura, today's Đông Dương close to Đà Nẵng).
Chinese sources play a crucial role in the reconstruction of the history of the region.
The "state" of Linyi was founded in 137 or 192 CE and was incorporated into Vietnam in 1471. The last traces of Champa vanished during the 18th century. The country was described in Zhao Rukuo's 趙汝适 (1170-1228) book Zhufanzhi 諸蕃志 from the Song period 宋 (960-1279), and individual treatises on the country (Zhancheng zhuan 占城傳) are to be found in the official dynastic histories Jiu Wudaishi 舊五代史 (ch. 138), Xin Wudaishi 新五代史 (ch. 74) and Yuanshi 元史 (ch. 210).
The name of the country goes back to the district name Xianglin 象林邑 (Tượng Lâm, today's Duy Xuyên), where Qu Lin 區憐 (Vietnamese reading Khu Liên, also called Lian 連, Kui 逵 or Da 達) adopted the title of king in the 190s. He can be identified from the inscription of a stele as Sri Mara. The country was influenced by Indian culture, used southern Indian script, and practiced Hinduism, or rather, its Brahmaist variant. Chinese sources also say that the status of women was higher than that of men. A king was usually succeeded by a son of his main consort, but the successor had to be reconfirmed by an assembly. The standard insignia of a king included a parasol. The ruler was assisted by one or two of his brothers as vice-kings. When being buried, a king was accompanied by members of his court, who were buried along with him (xunzang 殉葬). The administration consisted of state officials, and the country was divided into three administrative regions.
Linyi had diplomatic relations with the Chinese empires of Wu 吳 (222-280), Jin 晉 (265-420), and the Southern Dynasties 南朝 (420-589). Relations were complicated because Linyi repetitiously raided territory of commanderies under Chinese suzerainty, like Rinan 日南 or Jiuzhen 九真. The Eastern Jin dynasty therefore several times sent out punitive expeditions against Linyi. The country also sent tributes to China, and in turn, the title of king was officially accepted.
In 605, the Sui dynasty 隋 (581-618) launched an annihilation campaign under general Liu Fang 劉芳, but Champa survived. In the mid-8th century, the country was known to the Chinese as Huanwang. Diplomatic relations continued as before, with Chinese acceptance, tribute missions by Champa/Huanwang, and regular raids on territory controlled by China (actually the northern part of Vietnam). Champa had also conflicts with its western neighbour, the country of Zhenla 真臘 (Cambodia).
The Chinese term Zhancheng became prevalent from the 10th century on. Knowledge about the country was important for Chinese merchants who sailed along the South China Sea coast.
The Vietnamese Later Lê dynasty 後黎 (1428-1788) threw back the Champa population into the provinces of Khánh Hòa 慶和, Phan Rang 潘郎, Phan Thiết 潘切 and the Central Highlands (Tây Nguyên 西原), where kingship still existed in the kingdoms of Nam Bàn 南蟠 and Hoa Anh 華英 (today's province of Phú Yên 富安). The latter was extinguished in 1611 and transformed into the prefecture of Phú Yên. The former was conquered in 1697 and also transformed into several prefectures.