After the fall of the Ming dynasty in 1644 and the routing of the Shun army in the Battle of Shanhai Pass merely a day later, the Manchus successfully entered the Shanhai Pass to establish the Qing dynasty in China proper, with the capital relocated to Beijing.