The first settlements in what is now Vienna were the Celts, later Germanic tribes and after it, the Romans, which founded Vindobona
as a defensive point in the Danube river. After the fall of the Western
Roman Empire it was occupied Avars by Hungarians till the 9th century,
when Charlemagne conquered it and added it to the Eastern March,
which later grew into the duchy of Austria. During Middle Age Vienna was
an important ally of the Pope and it was first inhabited by Babenberg
dynasty and later Habsburg dynasty, becoming de fact the capital of the
Holy Roman Empire since 1437 (except when it was invaded by Matthias
Corvinus of Hungary), having a huge cultural and scientific development.
During the 16th and 17th centuries Vienna was threatened twice by an
Ottoman invation (Siege of Vienna in 1519 and Battle of Vienna in 1683)
and it suffered a plague which reduced a third its population; despite
this, Vienna was the center of Baroque-style in Europe. In the
Napoleonic wars Austria was defeated by France in Battle of Wagram,
becoming its ally till the French defeat in Russia, when the chancellor Klemens
von Metternich changed again Austrian Empire's side. When France was
defeated, in the Congress of Vienna, the Austrian Empire's territories
were preserved. In 1857 the city walls were demolished and, after the
loss in the Austro-Prussian War, Austria gave more power to its inner
nacionalisms, becoming the Austro-Hungarian Empire. During Franz Joseph I's reign the country had an important development but after Franz Ferdinand (heir
presumptive of the Austro-Hungarian throne) assaination in Sarajevo in
1916, WW1 started, which ended with the breakup of the Austro-Hungarian
Empire. After WW1 Vienna became the capital city of the Republic of
German-Austria and then the First Austrian Republic, remaining a high
center of culture and modernism and called red Vienna (because the
socialdemocrat SPÖ won always there until Dolfuss' dictatorship). In
1938 took place the Anschluss (union with Germany) and became
part of Nazi Germany till the end of WW2. After the war, Vienna and
Austria were firstly divided like Germany but in 1955 the Austrian State
Treaty created the Second Austrian Republic. It's the third UNO's
capital (after New York and Geneva) and since 1995 it belongs to the EU.