The town was founded in the 7th century, making it one of the oldest towns in Thailand. It was influenced by Mon, Shan, Burmese and Lanna Thai cultures, which is very evident in the Wat Phra Kaew Don Tao temple, which is a mix of Lanna, Burmese and Shan styles.