The Ming Dynasty ruled China from 1368 to 1644 and rebuilt the government and economy after defeating the Mongols. By 1400, Ming China had reinstated its education system, developed gunpowder and other technologies, and established large armies and a favorable position in international trade. While the Ming Emperor Yongle launched naval expeditions to East Africa in the early 1400s, later Ming rulers focused on internal development, limiting foreign trade and prioritizing border security and agriculture over expansion.