The territory of modern Ukraine has been inhabited by humans since 32,000 BC. During the Middle Ages, the area was a key center 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, the Ottoman Empire, Austro-Hungary, and Russia. A Cossack republic emerged and prospered during the 17th and 18th centuries, but Ukraine's territories remained divided until they were consolidated into a republic in the 20th century and then a hetmanate. It became independent in 1989.