Xiao Yan (464-549), courtesy name Shuda, a native of southern Lanling, was the founding emperor of Liang — Emperor Wu — the longest-reigning ruler of the Southern dynasties. A distant member of the Qi imperial house, he rose on literary talent and strategy in the service of Emperor Ming of Qi, and in 502 accepted the abdication that replaced Qi with Liang. Over forty-eight years his early reign was strenuous: diligent at the desk, clothed in plain fabric, open to criticism, founding schools — Liang was the cultural summit of the southern courts. He was himself a man of letters and learning, one of the 'Eight Friends of Jingling' with Shen Yue and Xie Tiao, carrying the Yongming literary line. In middle age he turned zealously to Buddhism: he built the Tongtai temple, four times 'gave himself' as a slave to the monastery and was ransomed each time by his ministers for sums in the hundreds of millions — the 'Buddha-emperor' astounded the realm; the official Guo Zushen submitted a memorial bearing his own coffin to warn that the capital held 'more than five hundred monasteries' while the people withered. In old age he took in the Eastern Wei defector Hou Jing; the Hou Jing revolt broke out in 548, the palace city fell in 549, and Xiao Yan, prisoner in the Jingju Hall, died of fury and want at eighty-six. Liang fell apart; the south turned from summit to decline, and the balance between north and south tipped for good.