In 1644, the Ming capital, Beijing, was captured by Li Zicheng's peasant rebels and the Chongzhen Emperor committed suicide. The Manchus of the Qing dynasty then allied with former Ming general Wu Sangui and seized control of Beijing. Remnant Ming forces led by Koxinga fled to Taiwan and established the Kingdom of Tungning, which eventually capitulated to Qing forces in 1683. Taiwan, previously inhabited mostly by non-Han aborigines, was sinicized during this period via large-scale migration accompanied by assimilation, despite efforts by the Manchus to prevent this, as they found it difficult to maintain control over the island. In 1681, the Kangxi Emperor ordered construction of the Willow Palisade to prevent Han Chinese migration to the three northeastern provinces, which nevertheless had harbored a significant Chinese population for centuries, especially in the southern Liaodong area. The Manchus designated Jilin and Heilongjiang as the Manchu homeland, to which the Manchus could hypothetically escape and regroup if the Qing dynasty fell. Because of increasing Russian territorial encroachment and annexation of neighboring territory, the Qing later reversed its policy and allowed the consolidation of a demographic Han majority in northeast China.