The Dragon-tail City was the southern gateway to the states of Nanzhao and Dali, on the northern reaches of the Erhe River in Xiaguan, Dali. According to the book history of Yunnan Province, "Dragon-tail City was built by Ge Luofeng, and extends several kilometers along the southern slopes of Cangshan Mountains. The city gate faces the Erhe River and a bridge over the river is 100 feet long." With Cangshan Mountains and Erhai Lake as natural barriers, the earthen city wall was built along Xieyang Peak and along the northern bank of the Erhe River as far as New Bridge. The city was a fortress protecting the capital of the states of Nanzhao and Dali.