In early 1927 China was poised on the brink of revolution. In the countryside, millions of peasants had thrown the landlords out of their villages and were sharing out the land. In city after city, trade unions and workers' militias were taking control.
A nationalist army was sweeping across southern China, brushing aside the old warlords. Yet that army turned on the workers and peasants who had ensured their victory, drowning the revolution in blood.
The second half of 1927 saw a wave of repression unleashed on all those who had dared to radically challenge the old order. Anyone suspected of being a union member, peasant activist or left winger was murdered or jailed.
All hope of change seemed closed off. The surviving members of the Chinese Communist Party (CCP) fled to remote mountains to hide.
The repercussions of the repression had an immense international effect. The revolution's defeat confirmed the isolation of Russia, which had seen a socialist revolution in 1917.
It helped ensure the rise of Joseph Stalin to absolute power and the victory of his counter-revolution in Russia.
1927 was one of the turning points of the last century. A victory, which was entirely possible, would have had a massive impact on the world.
The revolution, which began in 1919, was at first a nationalist one, caused by the impact of imperialism on China over the previous 70 years.
Beginning with the Opium Wars of the 1840s and 1850s, European powers and Japan took control of huge parts of China. They built 'concessions' in every major city – zones where foreign law, not Chinese, ruled.
Mass imports of manufactured European goods ruined old industries. Fast changing patterns of trade devastated many areas that had become dependent on single crops.
The enormous upheaval greatly weakened the Chinese imperial government. In 1911 it simply fell apart. There was no force that could replace it, and the country fell under the control of competing warlords, whose battles only added to China's instability.
The revolution of 1919 began with student demonstrations against Japanese colonialism. This blossomed into a mass boycott of Japanese goods in the cities. When hundreds of students were arrested, tens of thousands of Shanghai workers went on strike demanding their release.
Workers built mass trade unions, which fought and won strike after strike. Shanghai's cotton workers' wages rose by over 10 percent in the two years after 1919. Other groups of workers did even better.
The Russian Revolution of 1917 had an immense impact. Activists began to read Karl Marx and Vladimir Lenin, and to grasp the connections between capitalism and imperialism. The CCP grew out of the movement, and threw itself into building the unions.
But as strikes spread from foreign-owned firms to Chinese ones, they ran into hostility from the warlords. By the end of 1923 the labour movement and the CCP were effectively illegal almost everywhere in China.
The exception was the area around the southern city of Guangzhou, where a radical nationalist government had come to power.
The Guomindang (National Party) was a mixture of minor warlords, intellectuals and other middle class groups with a substantial mass base. The CCP initially agreed to cooperate with the Guomindang, but continue fighting separately for workers' interests.
However, by 1923, under pressure from Russia, the CCP had agreed to join the Guomindang and give up much of its distinctive politics.
The Russian Revolution was isolated, and Stalin's influence was growing. Stalin believed that a successful nationalist revolution in China would ease the pressure on Russia, and so Communists should back the Guomindang.
He thought that a workers' revolution wasn't possible in China, and so the CCP should simply 'do coolie work' for the Guomindang.
Many inside the CCP were suspicious of this strategy, but it won the day. At first it seemed to deliver results. As the labour movement revived, the CCP's influence grew rapidly.
In 1925 mass strikes exploded again. A general strike was called in Hong Kong, which ran for over 17 months and brought the British colony to a near-standstill.
According to one historian, 'In the summer of 1925, the strike committee became, in fact, a kind of workers' government. It had at its disposal an armed force of several thousand men.'
The Guomindang greatly extended the areas under its control. But the class tensions between it and the strikers sharpened greatly.
Employers and landlords had flooded into the Guomindang, and now wanted it to protect their interests.
The bigger the strikes, the more workers started to fight for their immediate needs as well as against foreign domination. The struggle became increasingly based on class, in which Chinese and foreign employers were on the same side against the workers.
Leon Trotsky was fighting Stalin's dominance in Russia and its effect on the strategy and tactics of the international Communist parties.
Trotsky argued about China in 1927, 'The struggle against imperialism, precisely because of its economic and military power, demands a powerful exertion of forces from the very depths of the Chinese people.
'Really to arouse the workers and peasants against imperialism is possible only by connecting their basic and most profound life interests with the cause of the country's liberation...
'But everything that brings the oppressed and exploited mass of the toilers to their feet inevitably pushes the national bourgeoisie into an open bloc with the imperialists.
'The class struggle between the bourgeoisie and the masses of workers and peasants is not weakened, but, on the contrary, it is sharpened by imperialist oppression, to the point of bloody civil war at every serious conflict.'
That became more obvious as the movement spread among China's peasantry. In 1926 the Guomindang launched a Northern Expedition to conquer northern China. As the armies moved north the countryside exploded.
Peasants threw off centuries of oppression to organise associations, drive landlords and moneylenders out of the villages, ban opium smoking and prostitution, and much more besides.
Within months hundreds of thousands were organised into peasant associations, which came to run huge areas of the countryside. Practically all rent and tax payments stopped.
The peasant explosion helped the Guomindang armies sweep aside the warlords' forces. By spring 1927 the Guomindang had taken the major cities of the Yangzi Valley and were advancing on Shanghai. But there were furious arguments about the peasant risings.
A CCP member became minister of agriculture in the provisional government in a bid to restrain the peasants. He argued that peasants should only attack 'counter-revolutionary' landlords.
As a Guomindang leader complained, 'If the peasants are strong enough, they consider every landlord counter-revolutionary in order to expropriate his land.'
The Guomindang was more frightened of the revolution than of the imperialists. Behind the frontlines it was already attacking trade unions and the CCP.
In February 1927 Shanghai's trade unions organised an armed rising to welcome the Guomindang-led Northern Expedition, then just 45 miles away.
The Guomindang halted, allowing Shanghai's warlords to attack the unions and kill hundreds of workers. But the movement wasn't broken – when the Guomindang did take Shanghai in mid-March another general strike erupted, and workers' militias took over the city.
Dozens of new unions sprang up, and factory after factory struck for better pay and conditions.
The Guomindang demanded that the militias give up their arms, and strikers go back to work. Tragically, the CCP backed these demands rather than stand up to the Guomindang.
On 12 April, the Guomindang sent gangsters and the army to attack union and CCP offices, killing hundreds and jailing thousands of union militants. The reign of terror lasted for months.
But further up the Yangzi valley, powerful trade unions and peasant associations were still on the rise. If the CCP had broken with the Guomindang, and called for an insurrection against the landlords and capitalists, a huge area of central China could have been won as a base against the counter-revolution.
Stalin's influence still held sway. He announced that the Shanghai massacre was the fault of the 'right wing' in the Guomindang, but that the left wing nationalists could still be trusted.
They could not be. The Guomindang turned on the mass movement across China. In the villages, peasant activists were burnt or buried alive by the returning landlords. In the cities, the workers' movement was destroyed.
The fate of the Chinese revolution became one of the key issues in the battle between Stalin and Trotsky.
Trotsky argued that the CCP should build workers' councils, which would lead the fight against imperialism and draw all the oppressed into struggle. In the process, the revolution would go beyond nationalist aims to uproot capitalism and the power of the landlords – making it a 'permanent revolution'.
At the heart of Trotsky's argument was the idea that a successful revolution from below would threaten China's capitalists and landowners as much as it threatened the imperialists.
The outcome in 1927 proved him right. But it also cemented Stalin's hold on power, seeming to prove that other revolutions were impossible.
In 1927 Chinese workers and peasants fought heroically against all those who oppressed and exploited them.
The tragedy of the Chinese revolution was that the CCP misled and disarmed the workers and peasants in the interests of 'national unity'.
Instead it should have based its strategy on the distinct class interests of the exploited against all exploiters, whether foreign or Chinese.