From 1873 to 1887, at least nominally, Austria-Hungary and Russia were again allies with the German Empire in the League of Three Emperors. The 1878 Treaty of Berlin concluded in the aftermath of Russia's victory against the Ottoman Empire in the war of 1877, allowed Austria-Hungary to occupy the Bosnia Vilayet. This, in turn, brought Austria into conflict with the Principality of Serbia, an autonomous ("de facto" independent) state within the Ottoman Empire under Russian influence and protection.