After the atomic bombings of Hiroshima and Nagasaki and the Soviet invasion of Japanese-occupied Manchuria, Japan surrendered. During the American occupation, 1945-1952, American officials under Douglas MacArthur supervised the Japanese government. All foreign relations were controlled by the United States, and all Japanese diplomats abroad were brought home. The Communist party inside Japan was tolerated, and it supported Mao Zedong's side of the civil war underway in China. Mao prevailed in 1949, and the Japanese left opened small-scale contacts with China, especially using labor unions and artistic groups. When Japan surrendered in 1945, six and a half million of its citizens were stranded in Asia and Pacific islands. That included 3.5 million in the military and 3 million civilians. 2.6 million Japanese were in China, including 1.1 million in Manchuria. All of these Japanese citizens were relocated back to Japan over a period of months and even years. However thousands of Japanese technicians were left behind in Northeast China until they were repatriated in 1953. The Chinese Communist Party was based on peasants and used these skilled men to update the technology, train local workers, and rebuild factories, mines, railways, and other industrial sites.