In an unrelated development, peasant rebels led by Li Zicheng conquered the Ming capital, Beijing, in 1644. Rather than serve them, Ming general Wu Sangui made an alliance with the Manchus and opened the Shanhai Pass to the Banner Armies led by the regent Prince Dorgon. He defeated the rebels and seized the capital. Resistance from the Southern Ming and the Revolt of the Three Feudatories led by Wu Sangui delayed the Qing conquest of China proper by nearly four decades. The conquest was only completed in 1683 under the Kangxi Emperor reign (1661–1722). The Ten Great Campaigns of the Qianlong Emperor from the 1750s to the 1790s extended Qing control into Inner Asia. The early Qing rulers maintained their Manchu customs, and while their title was Emperor, they used "Bogd khaan" when dealing with the Mongols and they were patrons of Tibetan Buddhism. They governed using Confucian styles and institutions of bureaucratic government and retained the imperial examinations to recruit Han Chinese to work under or in parallel with Manchus. They also adapted the ideals of the tributary system in dealing with neighboring territories.