Vojvodina held a key position as a buffer zone on the border between the Habsburg and Ottoman Empires, particularly from the Treaty of Karlowitz in 1699 onward, and was the location of several important battles between those powers as they fought over control of Central Europe. Freed from Turkish rule before the rest of present-day Serbia, Vojvodina was in Habsburg hands through the end of World War One. As a result of the Treaty of Trianon in 1920, the territory was handed over to the Kingdom of Serbs, Croats, and Slovenes and was incorporated into the newly established state. Between 1941 and 1944, the Axis Powers divided up and occupied the province, which became part of the newly formed Yugoslav socialist federal state at the end of World War Two. The 1974 constitution cemented Vojvodina's status within the federal system as one of two autonomous provinces, alongside Kosovo, within Serbia, with Novi Sad as its capital. As a federal unit, Vojvodina was represented in the Serbian and Yugoslav parliaments as well as on the Yugoslav collective presidency. As president of the Socialist Republic of Serbia, Slobodan Milošević revoked important elements of both Vojvodina's and Kosovo's autonomy during 1989–90. Only after the ousting of Milošević in 2000 did the process of slowly restoring Vojvodina's autonomy begin with the omnibus law of 2002 and led to the creation and adoption of a new statute for the province in 2009–10.
The conscious repopulation of the territories on the southern tip of the Pannonian Plain by the Habsburg rulers in the wake of Ottoman retreat from the mid-eighteenth century onward established the basis for the ethnic, cultural, linguistic, and religious diversity that is still the hallmark of the province today. According to the results of the 2011 population census in the Republic of Serbia, more than twenty different ethnic groups live in Vojvodina. With a total population of 1,932,000, the Autonomous Province of Vojvodina represents around 27 per cent of the population of the Republic of Serbia and approximately 24 per cent of its territory.