In July 1937 the Japanese tried once again to extend their territory in China. Chiang resisted, and Japan launched a full-scale offensive. Chiang’s forces had to abandon Beijing and Tianjin, but his troops held out for three months in Shanghai before retreating to Nanjing. When the Japanese captured Nanjing in December, they went on a rampage for seven weeks, massacring more than 100,000 civilians and fugitive soldiers, raping at least 20,000 women, and laying the city to waste.

By late 1938 Japan had seized control of most of northeast China, the Yangtze Valley as far inland as Hankou, and the area around Guangzhou on the southeastern coast. The KMT moved its capital and most of its military force inland to Chongqing in the southwestern province of Sichuan. Free China, as the KMT-ruled area was called, contained 60 percent of China’s population but only 5 percent of its industry, which hampered the war effort. In 1941 the United States entered World War II after Japan attacked Pearl Harbor, Hawaii. Thereafter, American advisers and aid were flown to China from Burma, which enabled Chiang to establish a number of modern military divisions. However, the bulk of China’s 5 million military troops consisted of ill-trained, demoralized conscripts.

During the first few years after the Japanese invasion, some genuine cooperation took place between the CCP and the KMT. However, animosity between the groups remained, and the cooperation largely ended after the KMT attacked the CCP’s army in 1941. From then on, although both sides continued to resist Japan, they concentrated more on preparing for their eventual conflict with each other. The KMT imposed an economic blockade on the CCP base at Yan’an, making it impossible for the Communists to get weapons except by capturing them from the Japanese. Defeating Japan was left largely to the United States, which was fighting the war in the Pacific.

During the war period, the Communists made major gains in territory, military forces, and party membership. They infiltrated many of the rural areas behind Japanese lines, where they skillfully organized the peasantry and built up the ranks of the party and their army (known as the Red Army). The CCP grew from about 300,000 members in 1933 to 1.2 million members by 1945. While in Yan’an, Mao Zedong had time to read Marxist and Leninist works and began giving lectures at party schools in which he spelled out his versions of Chinese history and Marxist theory. Whereas neither Marx nor Lenin had seen significant revolutionary potential in peasants, Mao came to glorify peasants as the true masses. During these years, Mao also perfected methods of moral and intellectual instruction and party discipline, which involved close discussion of assigned texts, personal confessions, struggle sessions (meetings in which people were publicly criticized and punished for past offenses), and dramatic public humiliations.

The KMT emerged from the war in a weakened state. Severe inflation had begun in 1939, when the government, cut off from its main sources of income in Japanese-occupied eastern China, printed more currency to finance the mounting costs of wartime operations. Despite substantial U.S. economic aid, the inflationary trend worsened and official corruption increased. The financial problems also caused a loss of morale in the KMT armed forces and alienation of the civilian populace.

After Japan surrendered in 1945, bringing World War II to an end, both the CCP and the KMT were rearmed, the KMT by the United States and the Communists by the Soviet Union. The Soviets had accepted the surrender of Japanese troops in Manchuria and turned over large stockpiles of Japanese weapons and ammunition to the CCP.