The territory of modern Ukraine has been inhabited since 32,000 BC. During the Middle Ages, the area was a key centre of East Slavic culture, with the powerful state of Kievan Rus' forming the basis of Ukrainian identity. Following its fragmentation in the 13th century, the territory was contested, ruled and divided by a variety of powers, including Lithuania, Poland, Austria - Hungary, the Ottoman Empire and Russia. A Cossack republic emerged and prospered during the 17th and 18th centuries, but its territory was eventually split between Poland and the Russian Empire, and finally merged fully into the Russian-dominated Soviet Union in the late 1940s.
During the 20th century three periods of independence occurred. The first of these periods occurred briefly during and immediately after the German occupation near the end of World War I and the second occurred, also briefly, and also during German occupation, during World War II. However, both of these first two earlier periods would eventually see Ukraine's territories consolidated back into a constituent republic within the Soviet Union.