When Did China Gain Independence?

China has always been an independent country. Although China has been invaded several times, China has never been ruled by another country for any length of time. The modern country of China has been under Communist rule since 1949.