During World War I, Warsaw was occupied by Germany from 4 August 1915 until November 1918. The Armistice of 11 November 1918 concluded that defeated Germany is to withdraw from all foreign areas, which included Warsaw. Germany did so, and underground leader Józef Piłsudski returned to Warsaw on the same day which marked the beginning of the Second Polish Republic, the first truly sovereign Polish state after 1795. In the course of the Polish–Soviet War (1919–1921), the 1920 Battle of Warsaw was fought on the eastern outskirts of the city. Poland successfully defended the capital, stopped the brunt of the Bolshevik Red Army and temporarily halted the "export of the communist revolution" to other parts of Europe.