After Hong Taiji's death, Dorgon, commander of the Solid White Banner, became regent. He quickly purged his rivals and took control over Hong Taiji's Solid Blue Banner. By 1644, an estimated two million people were living in the Eight Banners system. That year, the Chinese rebel Li Zicheng captured Beijing and the last emperor of the Ming dynasty, Chongzhen, committed suicide. Dorgon and his bannermen joined forces with Ming defector Wu Sangui to defeat Li at the Battle of Shanhai Pass and secure Beijing for the Qing. The young Shunzhi Emperor was then enthroned in the Forbidden City.