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 Prince Dorgon, who defeated the rebels and seized Beijing