 In early 1644, just as Dorgon and his advisors were pondering how to attack the Ming, peasant rebellions were dangerously approaching Beijing. On 24 April of that year, rebel leader Li Zicheng breached the walls of the Ming capital, pushing the Chongzhen Emperor to hang himself on a hill behind the Forbidden City. Hearing the news, Dorgon's Chinese advisors Hong Chengchou and Fan Wencheng (范文程; 1597 – 1666) urged the Manchu prince to seize this opportunity to present themselves as avengers of the fallen Ming and to claim the Mandate of Heaven for the Qing. The last obstacle between Dorgon and Beijing was Ming general Wu Sangui, who was garrisoned at Shanhai Pass at the eastern end of the Great Wall. Himself caught between the Manchus and Li Zicheng's forces, Wu requested Dorgon's help in ousting the bandits and restoring the Ming. When Dorgon asked Wu to work for the Qing instead, Wu had little choice but to accept. Aided by Wu Sangui's elite soldiers, who fought the rebel army for hours before Dorgon finally chose to intervene with his cavalry, the Qing won a decisive victory against Li Zicheng at the Battle of Shanhai Pass on 27 May. Li's defeated troops looted Beijing for several days until Li left the capital on 4 June with all the wealth he could carry.
