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 into several principalities in the 13th century and the devastation created by the Mongol invasion, the territorial unity collapsed and the area was contested, ruled, and divided by a variety of powers, including the Polish–Lithuanian Commonwealth, 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. In the aftermath of the Russian Revolution, a Ukrainian national movement for self-determination emerged, and the internationally recognized Ukrainian People's Republic was declared on 23 June 1917. After World War II, the western part of Ukraine merged into the Ukrainian Soviet Socialist Republic, and the whole country became a part of the Soviet Union. Ukraine gained its independence in 1991, following the dissolution of the Soviet Union.
Following its independence, Ukraine declared itself a neutral state; it formed a limited military partnership with Russia and other CIS countries while also establishing a partnership with NATO in 1994. In 2013, after the government of President Viktor Yanukovych had decided to suspend the Ukraine–European Union Association Agreement and seek closer economic ties with Russia, a several-months-long wave of demonstrations and protests known as the Euromaidan began, which later escalated into the 2014 Ukrainian revolution that led to the overthrow of Yanukovych and the establishment of a new government. These events formed the background for the annexation of Crimea by Russia in March 2014 and the War in Donbas in April 2014. On 1 January 2016, Ukraine applied for the economic component of the Deep and Comprehensive Free Trade Area with the European Union.Ukraine is a developing country ranking 74th in the Human Development Index. It is the poorest country in Europe alongside Moldova, suffering from a very high poverty rate as well as severe corruption. However, because of its extensive fertile farmlands, Ukraine is one of the largest grain exporters in the world. It also maintains the third-largest military in Europe after Russia and France. Ukraine is a unitary republic under a semi-presidential system with separate powers: legislative, executive, and judicial branches. The country is a member of the United Nations, the Council of Europe, the OSCE, the GUAM organization and is one of the founding states of the CIS, even though it never became a member of the organization.