The Chinese Civil War (1 August 1927-9 February 1961) was fought between the forces of the conservative Kuomintang (KMT) government of the Republic of China and the Communist Party of China (CPC). The war began in 1926, when KMT generalissimo Chiang Kai-shek ended the internationally-recognized Beiyang government's rule during his Northern Expedition and established China's new capital at Nanjing. The KMT and CPC worked together to bring an end to the Warlord era, destroying warlords Zhang Zuolin, Wu Peifu, and many others and creating a new, united China. However, the communists outlived their usefulness to Chiang after the destruction of the warlord cliques, and Chiang had up to 5,400 communists massacred in Shanghai on 12 April 1937, the first of many anti-communist purges that occurred in China. The KMT purged its Wuhan-based left wing, which had been led by Wang Jingwei, alienating the leftist communists; this led to war between the KMT and Mao Zedong's CPC.
The first phase of the war was fought intermittently from 1927 to 1936, and the communists narrowly escaped destruction in the "Long March" of October 1934-October 1935. In 1937, the two parties declared a ceasefire so that they could form a united front against Japan during the Second Sino-Japanese War, and there was little violence between the two temporary allies. Upon the war's end in August 1945, however, hostilities broke out again, and the Soviet-backed People's Liberation Army, the CPC's armed wing, waged a guerrilla warfare campaign that managed to secure Manchuria as a communist stronghold. After KMT defeats at Yanzhou, Liaoshen, Shanghai, Xuzhou, and several other places, the PLA was able to conquer the KMT's capital of Nanjing in 1949. Mao proclaimed the formation of the "People's Republic of China" in Beijing, and the KMT was overthrown, forced to flee to Taiwan. On 1 May 1950, the PLA's capture of Hainan Island is considered to have been the end of the four-year second phase of the Civil War, but a Kuomintang Islamic insurgency erupted in the Xinjiang region during the 1950s, as did a guerrilla campaign by KMT guerrillas on the border with Burma. The PLA's "bandit suppression" campaigns continued into the 1960s, and the KMT government on Taiwan and the PRC government on mainland China would continue to have minor armed confrontations and crises until 1991, when the ROC officially proclaimed that the war was over. There has been no official peace treaty or ceasefire, however, and some consider the war to be ongoing, albeit without open warfare.