The city was founded in the late 18th century by Thao Kham Phong, descendant of Phra Wo and Phra Ta, who escaped from King Siribunsan of Vientiane into the Siam Kingdom during the reign of King Taksin the Great.