Relations between the Soviet Union and the major Axis powers were generally hostile before 1939. In the Spanish Civil War, the Soviet Union gave military aid to the Second Spanish Republic, against Spanish Nationalist forces, which were assisted by Germany and Italy. However the Nationalist forces were victorious. In 1938 and 1939, the USSR fought and defeated Japan in two separate border wars, at Lake Khasan and Khalkhin Gol. The Soviets suffered another political defeat when an ally, Czechoslovakia, was partitioned and partially annexed, by Germany, Hungary and Poland—with the agreement of Britain and France—in 1938–39.