The civil war known as the War of the Two Capitals soon broke out. Ragibagh's army broke through the Great Wall at several points and advanced on Dadu; but was severely defeated by El Temür's troops. At the time, most of Ragibagh's army were involved on the Great Wall front, and the Shangdu court was compelled to surrender on the very next day. Dawlat Shah and most of the leading loyalists were taken prisoner and later executed by the Dadu faction after surrender; but Ragibagh is said to have disappeared after that, evidently murdered.