The newly allied armies captured Beijing on 6 June. The Shunzhi Emperor was invested as the "Son of Heaven" on 30 October. The Manchus, who had positioned themselves as political heirs to the Ming emperor by defeating Li Zicheng, completed the symbolic transition by holding a formal funeral for the Chongzhen Emperor. However, conquering the rest of China Proper took another seventeen years of battling Ming loyalists, pretenders and rebels. The last Ming pretender, Prince Gui, sought refuge with the King of Burma, Pindale Min, but was turned over to a Qing expeditionary army commanded by Wu Sangui, who had him brought back to Yunnan province and executed in early 1662.