The Republic of Estonia was proclaimed in Tallinn on 24 February 1918 while German occupation followed on the next day. German rule ended with the November Revolution in Germany. During the Estonian War of Independence, Soviet troops were halted only 40 km east of Tallinn by the end of 1918. Tallinn was the site of a failed Communist coup d'état attempt of 1924.