Russia continued to expand its empire, occupying the Caucasus, Tashkent and Samarkand. In foreign affairs, the period began with the conclusion of the Crimean War. Russian policy brought it into conflict with other European powers, in particular Austria-Hungary, as it sought to extend influence over the European portions of the receding Ottoman Empire and regain naval access to the Black Sea. This culminated in a successful war with the Ottoman Empire in 1877–1878, followed by the Treaty of San Stefano and Congress of Berlin in 1878 by which an independent Bulgaria came into being and by acquisition of former Ottoman territories in the South Caucasus. Russia joined Germany and Austria-Hungary in the League of the Three Emperors, but friction continued with both partners over Bulgaria and the alliance with Germany came to an end in 1890.