The Qing dynasty was China's last imperial dynasty. The first century of their reign was a time of peace and prosperity, even though the Chinese population was discriminated in various ways. Towards the end of the 18th century, however, a general economic crisis developed, leading to impoverishment and sporadic rebellions against the foreign rulers. After 1850, the empire was constantly close to collapse. Rebellions upset the empire from within, foreign powers tore from outside. The power of the Qing diminished rapidly. In 1911, the last emperor was overthrown, and on January 1, 1912, the Republic of China was established.