 In the 13th century , the Pagan Empire , along with the Khmer Empire , was one of the two main empires in mainland Southeast Asia . For much of its history , Pagan 's neighbor to the northeast was not China but the independent Dali Kingdom and its predecessor Nanzhao , both with Dali as their capital city . Dali @-@ based kingdoms were a power in their own right , at times allying themselves with the Tibetan Empire to their west and at other times with China 's Tang and Song dynasties . Indeed , Nanzhao 's mounted armies ventured deep into what is today Burma and may have been behind the founding of the medieval city of Pagan and the Pagan Dynasty itself . 
