In the late seventeenth century, European powers began to consolidate against the Ottomans and formed the Holy League, reversing a number of Ottoman land gains during the Great Turkish War of 1683–99. Nevertheless, Ottoman armies were able to hold their own against their European rivals until the second half of the eighteenth century. In the nineteenth century the Ottomans were confronted with insurrection from their Serbian (1804–1817) and Greek (1821–1832) subjects. This occurred in tandem with the Russo-Turkish wars, which further destabilized the empire. The final retreat of Ottoman rule came with the First Balkan War (1912–1913), followed by the signing of the Treaty of Sèvres at the close of World War I.