Karađorđević dynasty
Since 1817, the Principality was ruled by the Obrenović dynasty (replaced by the Karađorđević dynasty for a short time). The Principality, suzerainty of the Ottoman Empire, "de facto" achieved full independence when the last Ottoman troops left Belgrade in 1867. The Congress of Berlin in 1878 recognized the formal independence of the Principality of Serbia, and in its composition Nišava, Pirot, Toplica and Vranje districts entered the South part of Serbia.