Li Zicheng (
李自成) proclaimed the dynasty in Xi'an early in 1644, with the reign title
永昌, and took Beijing that spring, but held it only about forty days: Wu Sangui (
吴三桂) let the Manchu armies through Shanhai Pass, Li was driven out, and the Qing took his place.