The majestic architecture of the ancient city of Dali dates back to the Ming and Qing dynasties, but Dali history is far older than those buildings.
As one of the earliest cultural birthplaces of Yunnan, the history of Dali began in the 4th century.
In the middle of the 7th century, six larger ethnic tribes appeared in the Erhai area. In 738 AD, with the support of the Tang Dynasty, Nanzhao Kingdom was established by Yimouxun who was one Yi leaders of the local tribes. Weishan, the birthplace of the Nanzhao Kingdom, was influenced by the religion so there were many Buddhist caves in Shibaoshan which was the natural barrier of Weishan Old Town.
The Kingdom of Nanzhao covering an area of present-day Yunnan, Guizhou, southwestern Sichuan, as well as northern Burma, Laos, and Vietnam. It also conquered the territory of the Tang Dynasty: the Sichuan Basin, so the military of the Tang Dynasty broke the border of the Nanzhao Kingdom. Nanzhao had fallen apart and was overthrown in 902.
The Kingdom of Dali (937–1253) was established by Duan Siping(the Bai general)in 937, it lasted for more than 300 years. Under Bai’s rule, the territory expanded continuously and its economy prospered. Trade with Burma, Vietnam, Malaya, India, Persia, and other countries has been established, and Buddhism has begun to flourish. The kingdom reached the apex of its power until 1253, Kublai Khan led his army from the Qinghai-Tibet Plateau to invade the Dali Kingdom and ended it. Many temples and pagodas were built during the period, they witnessed the rise and fall of the Dali Kingdom. Such as the Gantong Temple, Shenyuan Temple, and the most famous one, Chongsheng Temple. The Chongsheng Temple was destroyed during the Muslim Rebellion, but the Three Pagodas of Chongsheng Temple stands still though suffered from some severe earthquakes.
In 1382, the Ming Dynasty occupied Dali and take over it, established government, and the system continued to the Qing Dynasty.
The People’s Republic of China was founded in 1949 and set Dali Commissioner’s Office in 1950. Dali Bai Autonomous Prefecture was established in 1956, Xiaguan Town became the capital of Dali Autonomous Prefecture.