Treaty of Berlin
Eventually the area was liberated from Ottoman control which led to the Treaty of Berlin, which in turn was instrumental in creating the Principality of Bulgaria which, in 1908, officially declared independence and formed the Kingdom of Bulgaria after 512 years of Ottoman rule.