Initially, it seemed as if the two great empires would be strong allies. German Chancellor Otto von Bismarck formed the League of the Three Emperors in 1872 binding together Russia, Austria, and Germany. The League stated that republicanism and socialism were common enemies, and that the three powers would discuss any matters concerning foreign policy. Bismarck needed good relations with Russia in order to keep France isolated. In 1877–1878, Russia fought a victorious war with the Ottoman Empire and attempted to impose the Treaty of San Stefano on it. This upset the British in particular, as they were long concerned with preserving the Ottoman Empire and preventing a Russian takeover of the Bosphorus. Germany hosted the Congress of Berlin (1878), whereby a more moderate peace settlement was agreed to. Germany had no direct interest in the Balkans, however, which was largely an Austrian and Russian sphere of influence.