Muang Sua (, ) was the name of Luang Phrabang following its conquest in 698 by a Tai/Lao prince, Khun Lo, who seized his opportunity when the king of Nanzhao was engaged elsewhere. Khun Lo had been awarded the town by his father, Khun Borom, who is associated with the Lao legend of the creation of the world, which the Lao share with the Shan and other peoples of the region. Khun Lo established a dynasty whose fifteen rulers reigned over an independent Muang Sua for the better part of a century.

History

Muang Sua, nowadays known as Luang Prabang, was named in 698 following its conquest, by the Lao prince Khun Lo, who was awarded the town by his father Khun Borom.

In the second half of the eighth century, Nanzhao intervened frequently in the affairs of the principalities of the middle Mekong Valley, resulting in the occupation of Muang Sua in 709. Nanzhao princes or administrators replaced the aristocracy of Tai overlords. Dates of the occupation are not known, but it probably ended well before the northward expansion of the Khmer Empire under Indravarman I (reigned 877–889) and extended as far as the territories of Sipsong Panna on the upper Mekong.

Recent historical research has shown that the Mongols, who destroyed Dali in 1253 and made the area a province of their empire—naming it Yunnan—exercised a decisive political influence in the middle Mekong Valley for the better part of a century. In 1271 Panya Lang, founder of a new dynasty headed by rulers bearing the title panya (lord), began his rule over a fully sovereign Muang Sua. In 1286 Panya Lang's son, Panya Khamphong, was involved in a coup d'état that was probably instigated by the Mongols and that exiled his father. Upon his father's death in 1316, Panya Khamphong assumed his throne.