Southern Qi

The Southern Qi ( or ) (479–502) also known as Xiao Qi() was the second of the Southern dynasties in China, followed by the Liang Dynasty.
History.
The dynasty began in 479, when Xiao Daocheng forced the Emperor Shun of Liu Song (宋顺帝) into yielding the throne to him, ending Liu Song and starting Southern Qi, as its Emperor Gao. The dynasty's name was taken from Xiao's fief, which roughly occupied the same territory as the Warring States era Kingdom of Qi. The Book of the Qi does not mention whether or not Xiao had any blood relationship to either the House of Jiang or House of Tian, the two dynasties which had previously ruled that kingdom.
During its 23-year history, the dynasty was largely filled with instability, as after the death of the capable Emperor Gao and Emperor Wu, Emperor Wu's grandson Xiao Zhaoye (萧昭业) was assassinated by Emperor Wu's intelligent but cruel and suspicious cousin Xiao Luan (萧鸾), who took over as Emperor Ming, and proceeded to carry out massive executions of Emperor Gao's and Emperor Wu's sons, as well as officials whom he suspected of plotting against him.
The arbitrariness of these executions was exacerbated after Emperor Ming was succeeded by his son Xiao Baojuan, whose actions drew multiple rebellions, the last of which, by the general Xiao Yan (萧衍) led to Southern Qi's fall and succession by Xiao Yan's Liang Dynasty.
More than fifty percent of Tuoba Xianbei princesses of the Northern Wei were married to southern Han Chinese men from the imperial families and aristocrats from southern China of the Southern dynasties who defected and moved north to join the Northern Wei. Tuoba Xianbei Princess Nanyang (南阳长公主) was married to Xiao Baoyin (萧宝夤), a Han Chinese member of Southern Qi royalty. Xianbei Tuoba Emperor Xiaozhuang of Northern Wei's sister the Shouyang Princess was wedded to the Han Chinese Liang dynasty ruler Emperor Wu of Liang's son Xiao Zong 蕭綜.
War with Northern Wei.
In 479, after Xiao Daocheng usurped the throne of Liu Song, the Northern Wei emperor prepared to invade under the pretext of installing Liu Chang, son of Emperor Wen of Liu Song who had been in exile in Wei since 465AD.
Wei troops began to attack Shouyang but could not take the city. The Southern Qi began to fortify their capital, Jiankang, in order to prevent further Wei raids.
Multiple sieges and skirmishes were fought until 481 but the war did not witnessed any major campaign. A peace treaty was signed in 490 with the Emperor Wu.