Most of the territory of what is now the Republic of Serbia was part of the Ottoman Empire throughout the Early Modern period, especially Central Serbia and Southern Serbia, unlike Vojvodina which had passed to Habsburg rule starting from the end of the 17th century (with several takeovers of Central Serbia as well). In the 14th and 15th centuries, the Serbian Despotate was conquered by the Ottoman Empire as part of the Ottoman conquest of the Balkans. The Ottomans defeated the Serbs at the Battle of Maritsa in 1371, making vassals of the southern governors. Soon thereafter, Serbian Emperor Stefan Uroš V died; as he was childless and the nobility could not agree on the rightful heir, the Empire was subsequently ruled by semi-independent provincial lords, who often were in feuds with each other. The most powerful of these, Lazar of Serbia, the Duke of a region now encompassing present-day central Serbia, that had not yet fallen under Ottoman rule, confronted the Ottomans at the Battle of Kosovo in 1389. The outcome of the battle was the mutual annihilation of both armies, but Serbia did eventually fall to the Ottomans. Stefan Lazarević, the son of Lazar, succeeded him as ruler, but had by 1394 become an Ottoman vassal. In 1402 he renounced Ottoman rule and became an ally of Hungary, and the years that followed were characterized by the Ottomans and Hungary battling over the territory of Serbia. In 1453, the Ottomans conquered Constantinople, and in 1458 Athens was taken. In 1459, Serbia was annexed, followed by Greece a year later. Several minor, unsuccessful and short-lived revolts were conducted against Ottoman rule mostly with the help of the Habsburgs; 1594, 1688–1691, 1718–1739 and 1788. In 1799, the dahia (janissary leaders, high-status infantry in the provinces) took over the Sanjak of Smederevo, renouncing the Sultan and imposing higher taxes. In 1804, they murdered the most notable intellectuals and nobles, known as the Slaughter of the Dukes. In retaliation, the Serbs took arms and had by 1806 killed or driven out all of the dahia, but the fight did not stop; when the Sultan were to send the new Pasha into the province, the Serbs killed him. The revolt continued, in what would be known as the First Serbian Uprising, with the Serbs under Karageorge defeating the Turks in several battles, liberating most of central Serbia; a fully working government was established.