The downfall of the Ming dynasty was brought about by a rebellion due to the inability of the government to provide food in a time of famine. When the rebels attacked, the best Ming troops were deployed along the Great Wall to protect against a Manchurian tribe. The Ming commander was offered help by the Manchurians and helped drive out the rebels. But once the rebels were purged from the capital, the Manchurians refused to leave. This forced the Ming to retreat to the south.