Although it sought to avoid entering the war, Spain did make plans for defence of the country. Initially, the mass of the Spanish army was stationed in southern Spain in case of an Allied attack from Gibraltar during 1940 and 1941. However, Franco ordered the divisions to gradually redeploy in the mountains along the French border in case of a possible German invasion of Spain as Axis interest in Gibraltar grew. By the time it became clear that the Allies were gaining the upper hand in the conflict, Franco had amassed all his troops on the French border and received personal assurances from the leaders of Allied countries that they did not wish to invade Spain