The Ming Empire collapsed mainly from within as rival groups carved up sections of the empire for themselves and fought for supremacy. North of the Great Wall, their historical enemies the Mongols and the Jurchens lived. Both of these peoples had historically ruled in the region, but the Ming Empire kept them out. The Jurchen ruling families officially intermarried with Mongol ruling families, subjugated the Mongols, and absorbed their troops. In a way similar to the way Genghis Khan incorporated rival tribes and countries into his own in the beginning of his rule, the Jurchen ruler incorporated Mongols and Ming people. Just after a rebel army conquered Beijing, the Jurchens, Mongols and a Ming army swept south in 1644, and the Qing Dynasty began. The Qing Empire became quite big, even establishing some control in Tibet and Xinjiang. Like the Yuan Empire and the Ming Empire, the Qing Dynasty had strong and long-lived rulers at the beginning of the dynastic era, a period of prosperity in the beginning and middle of their dynastic era, and natural disasters, rebellions, invasions and inept ruling courts at the end.