 Peking was occupied by American soldiers in late 1945 and 1946, but there was a steady outflow of foreign residents from Beijing afterwards as the civil war between nationalists and the Chinese communists moved ever closer.On January 23, 1949 the nationalist forces in Beijing surrendered to the communists.At the time of the victory of the People's Republic of China (1949), a number of foreign legations were still situated in the legation area.