Ukraine was the center of the first eastern Slavic state, Kievan Rus', which was established in the 9th century and became the largest and most powerful state in Europe in the 10th and 11th centuries. Weakened by internal quarrels among princes and by Mongol invasions, Kievan Rus' was incorporated into the Grand Duchy of Lithuania and eventually into the Polish-Lithuanian Commonwealth. The cultural and religious legacy of Kyivan Rus laid the foundation for Ukrainian nationalism through subsequent centuries.
A new Ukrainian state, the Cossack Hetmanate, was established during the mid-17th century after an uprising against the Poles. Despite continuous Muscovite pressure, the Hetmanate managed to remain autonomous for well over 100 years. During the latter part of the 18th century, most Ukrainian ethnographic territory was absorbed by the Russian Empire. The Western areas of Bukowina, Galicia, and Transcarpathia were part of the Austro-Hungarian Empire during this time.
Following the collapse of czarist Russia in 1917, Ukraine was able to bring about a short-lived period of independence (1917-20).
From 1921 to 1991, Ukraine was a republic of the Soviet Union.
Although final independence for Ukraine was achieved in 1991 with the dissolution of the USSR, democracy remained elusive. A peaceful mass protest "Orange Revolution" in the closing months of 2004 forced the authorities to overturn a rigged presidential election and to allow a new internationally monitored vote that swept into power a reformist slate under Viktor Yushchenko.