At the beginning of the Tang Dynasty, Birdman invaded Erhai Lake area continuously, conquered the local Baiman, and successively made six imperial edicts (the local people called the king the imperial edict, meaning the great leader and chief). Six imperial edicts are six tribes. Among them, the imperial edict of the Dream Society is at the southernmost tip, so it is also called Nanzhao.
Under the threat of Tubo, the fillers of the five imperial edicts were often attached to Tubo, and Nanzhao was attached to the Tang Dynasty. With the support of the Tang Dynasty; Pirog unified the six imperial edicts, conquered the local tribes and defeated the western Tubo.
In 738, Emperor Xuanzong of the Tang Dynasty made Piluoge the king of Yunnan, and in 739 he lived in Taihe City (now Dali, Yunnan) with its capital. Various systems have also been formed one after another, and the Nannuma regime was formally established.