This is the overview article of the history of Tallinn, Estonia. For the timeline, see Timeline of Tallinn Historical affiliations Revala (county) pre-1219 Kingdom of Denmark 1219–1227 Livonian Brothers of the Sword 1227–1237 Livonian Order 1237–1238 Kingdom of Denmark 1238–1332 Livonian Order (protectorate) 1332–1340 Kingdom of Denmark 1340–1346 Teutonic Order 1346–1347 Livonian Order 1347–1561 Kingdom of Sweden 1561–1710 Tsardom of Russia (Muscovy) 1710–1721 Russian Empire 1721–1917 Russian Republic 1917 Russian Soviet Republic 1917–1918 Republic of Estonia 1918 German occupation 1918 Republic of Estonia 1918–1940 Soviet occupation 1940-1941 German occupation 1941–1944 Republic of Estonia 1944 Soviet occupation 1944–1990 Republic of Estonia (in transition) 1990–1991 Repu