During World War II, because of a growing Japanese threat over the border between Mongolia and Manchuria, the Soviet Union reversed the course of Mongolian socialism in favor of a new policy of economic gradualism and build-up of the national defence. The Soviet and Mongolian armies defeated Japanese forces that had invaded eastern Mongolia in the summer of 1939 at the Battle of Khalkhin Gol, and a truce was signed setting up a commission to define the Mongolian-Manchurian border in the autumn of that year.