In 1354, when Fa Ngum founded the kingdom of Lan Xang. Vientiane became an important administrative city, even though it was not made the capital. King Setthathirath officially established it as the capital of Lan Xang in 1563, to avoid Burmese invasion. When Lan Xang fell apart in 1707, it became an independent Kingdom of Vientiane. In 1779, it was conquered by the Siamese general Phraya Chakri and made a vassal of Siam.