After the end of the war in August 1945, the Nationalist Government moved back to Nanjing. With American help, Nationalist troops moved to take the Japanese surrender in North China. The Soviet Union, as part of the Yalta agreement allowing a Soviet sphere of influence in Manchuria, dismantled and removed more than half the industrial equipment left there by the Japanese. The Soviet presence in northeast China enabled the Communists to move in long enough to arm themselves with the equipment surrendered by the withdrawing Japanese army. The problems of rehabilitating the formerly Japanese-occupied areas and of reconstructing the nation from the ravages of a protracted war were staggering.