The sole emperor of the Xin dynasty, Wang Mang, was the nephew of Grand Empress Dowager Wang Zhengjun. After the death of her step-grandson Emperor Ai in 1 BC, Wang Mang rose to power. After several years of cultivating a personality cult, he finally proclaimed himself emperor in 9 AD. However, while a creative scholar and politician, he was an incompetent ruler, and his capital Chang'an was besieged by peasant rebels in 23 AD. He died in the siege, and the Han dynasty was restored by descendants of the former imperial clan.