In 937 Duan Siping of the Bai, joined by the thirty-seven tribes of eastern Yunnan, overthrew the short-lived Dayining and founded the Dali kingdom, seated at Yangjemie (Dali). The Duan house honored Buddhism - of its twenty-two kings nine abdicated into monastic life - and the 'fragrant kingdom of the dharma' (the grottoes of Shizhongshan at Jianchuan and the Zhang Shengwen scroll) witness its Buddhist art; politically it ran on feudal fiefs and sworn leagues, trading tea and horses with the Song, the horse markets of Yongzhou an annual fixture. Dali kept the peace within its borders over three centuries, and Yunnan rested. In 1253 Kublai crossed the river on inflated hides and stood before the walls; Duan Xingzhi surrendered, the kingdom fell - twenty-two kings, 316 years - and the Yuan set up the province of Yunnan, the region joined at last to direct central rule.
Editorial note on dating Duan Siping founded it on Nanzhao's lands (after short-lived regimes 902-937); fell to the Mongols in 1253.