Several different Chinese Dynasties ruled China for thousands of years. The responses and fate of these dynasties greatly varied as China cycled between development in terms of technology, culture, and wealth, and degenerated through war, famine, and foreign intervention. Some like the Song and the Tang, particularly rich and stable until the very end of their cycles. The Sui dynasty was formed from uniting several self-ruling states. The Yuan and Qing dynasties were founded by the Mongols and the Manchus, respectively.