In the early 20th Century China was divided amongst hostile warlords.
So the KMT, the party which largely led the initial revolution which deposed the Emperor in 1912, set up a rival government in the South to try and reunite China.
The Communist party however was created after the anti-Japanese protests during the May 4th Movement of 1919.
But the 2 parties were connected, for instance, many of their leaders, like Zhou Enlai and Wang Jingwei, had studied abroad in exchange programs set up by Anarchists.
Plus the Soviet Union initially supplied the KMT in exchange for them forming a united front with the small Communist party.
However Chiang Kai Shek, an anti-communist, took over the KMT in 1926 and launched the Northern Expedition to unite China.
The Communist party, with Soviet advisors, helped the KMT captured Shanghai.
But in 1927 foreigners in Nanjing were killed and Chiang blamed this on the communists.
So he hired a criminals to massacre communists in Shanghai, which temporarily divided the KMT and started the Civil War.
Communists rose up in the South, where it recruited many ethnic Hakkas, but Zhou Enlai and his few thousand men were forced to flee Nanchang in August 1927 on The Little Long March.
Meanwhile Mao Zedong peasant based Autumn Harvest Uprising also failed and so to did the short Guangzhou uprising in December.
The KMT on the other-hand temporarily united China, but in 1930 the Central Plains war broke out.
This allowed Mao to establish a small soviet in the mountains of Jiangxi.
The KMT tried to encircle them in 1930, but this failed and more Soviets were formed nearby which united to form the Chinese Soviet Republic in 1931 just as the Japanese invaded Manchuria.
But Chiang continued to launch ever larger encirclement campaigns and the Communists were forced to flee North on the famous long March in 1935.
Many warlords, looking to preserve their own troops, didn’t confront the Communists so Chiang hired bandits to harass them.
But, despite losing thousands, the now peasant based Communists established a new base near Shaanxi, which was then ruled by Yan Xishan.
However the warlords, now fearful of Japan, forced Chiang Kai Shek to form a united front with the communists in 1936, just before the Japanese invaded.
Although both groups opposed the Japanese during the war, both tried to gain influence amongst the anti-Japanese militias,
they also occasionally fought one another and, in 1940, the United Front broke down when the KMT ambushed Communist troops.
But the guerilla tactics of the Communists proved to be more popular within the Japanese controlled regions
and the KMT lost a lot of support due to their repression and controversial tactics, like flooding the Yellow River.
So, when the war ended in 1945, the communists had a couple million soldiers. Plus, at the end of the war the Soviets invaded Manchuria, a heavily industrialised region.
They helped the Communists move into land vacated by the Japanese and launched small campaigns in the surrounding region against the KMT and warlords like Yan Xishan.
Chiang Kai Shek did temporarily keep Japanese troops in Chinese Cities to stop the Communists advance and some warlords absorbed the Japanese into their armies.
The international community tried to make peace and power was almost split between the two groups, but the talks broke down and the Civil war erupted again.
Although the KMT had troops in Manchuria, the Soviets handed it over to the Communists.
So the KMT launched a massive offensive in 1947.
This however was a failure, and over 1 million KMT soldiers died, which allowed the Communists to expand their holdings in the North East throughout 1947 and 48.
By late 1948, the Communists had moved as far South as Luoyang and, unlike the KMT, didn’t suffer from as much disunity.
So they launched 3 major attacks, each with hundreds of thousands of men.
The Liaoshen campaign captured all of Manchuria, Huaihai put them in control of Central China and the Pingjin campaign ended when Beijing fell in January 1949.
Ma Bufang of the Ma Clique decided to join in the fight against the Communists, but because of the numerous defeats Chiang Kai Shek resigned.
Li Zongren, of the New Guangxi Clique, took over and rejected Maos demands.
So Mao advanced again in early 1949 and, within months, captured key cities like Shanghai, Xian, Guangzhou and Yan Xishan fled Taiyuan.
Meanwhile 200,000 men captured Lanzhou in the West and this persuaded the leaders of Xinjiang, who had been in a state of war for years, to surrender to Mao in October.
Chiang Kai Shek, now trapped in Chengdu, flew to Taiwan and was soon joined by a couple million refugees.
The Communists tried to advance on Taiwan, but were stopped at the the small island of Kinmen.
But they were able to land on Hainan island in 1950 and began suppressing the bandits and the mainly Muslim, anti-communist insurgents.
Plus after diplomatic talks with the Tibetans broke down they defeated the Tibetans at the battle of Chamdo in October 1950 - bringing it largely under Chinese control.
However, by now the Korean War had erupted and China would soon become involved in that.
So Taipei and Taiwan became the new capital of the Republic of China and it was defended by American ships in the Taiwan straits.
However, Communist China still claims Taiwan and the Republic of China still claims to be the rightful government of China.