After the Crimean War, Russia pursued cautious and well-calculated foreign policies until nationalist passions and another Balkan crisis almost caused a catastrophic war in the late 1870s. The Treaty of Paris (1856), signed at the end of the Crimean War, had demilitarized the Black Sea and deprived Russia of southern Bessarabia and a narrow strip of land at the mouth of the Danube River. The treaty gave the West European powers the nominal duty of protecting Christians living in the Ottoman Empire, removing that role from Russia, which had been designated as such a protector in the 1774 Treaty of Kuchuk-Kainarji. Russia's primary goal during the first phase of Alexander II's foreign policy was to alter the Treaty of Paris to regain naval access to the Black Sea. Russian statesmen viewed Britain and Austria (redesignated as Austria-Hungary in 1867) as opposed to that goal, so foreign policy concentrated on good relations with France, Prussia, and the United States. Prussia (Germany as of 1871) replaced Britain as Russia's chief banker in this period.
Following the Crimean War, the regime revived its expansionist policies. Russian troops first moved to gain control of the Caucasus region, where the revolts of Muslim tribesmen--Chechens, Cherkess, and Dagestanis--had continued despite numerous Russian campaigns in the nineteenth century. Once the forces of Aleksandr Baryatinskiy had captured the legendary Chechen rebel leader Shamil in 1859, the army resumed the expansion into Central Asia that had begun under Nicholas I. The capture of Tashkent was a significant victory over the Quqon (Kokand) Khanate, part of which was annexed in 1866. By 1867 Russian forces had captured enough territory to form the Guberniya (Governorate General) of Turkestan, the capital of which was Tashkent. The Bukhoro (Bukhara) Khanate then lost the crucial Samarqand (Samarkand area to Russian forces in 1868. To avoid alarming Britain, which had strong interests in protecting nearby India, Russia left the Bukhoran territories directly bordering Afghanistan and Persia nominally independent. The Central Asian khanates retained a degree of autonomy until 1917.
Russia followed the United States, Britain, and France in establishing relations with Japan, and, together with Britain and France, Russia obtained concessions from China consequent to the Second Opium War (1856-1860). Under the Treaty of Aigun in 1858 and the Treaty of Beijing in 1860, China ceded to Russia extensive trading rights and regions adjacent to the Amur and Ussuri rivers and allowed Russia to begin building a port and naval base at Vladivostok. Meanwhile, in 1867 the logic of the balance of power and the cost of developing and defending the Amur-Ussuri region dictated that Russia sell Alaska to the United States in order to acquire much-needed funds.
As part of the regime's foreign policy goals in Europe, Russia initially gave guarded support to France's anti-Austrian diplomacy. A weak Franco-Russian entente soured, however, when France backed a Polish uprising against Russian rule in 1863. Russia then aligned itself more closely with Prussia by approving the unification of Germany in exchange for a revision of the Treaty of Paris and the remilitarization of the Black Sea. These diplomatic achievements came at a London conference in 1871, following France's defeat in the Franco-Prussian War. After 1871 Germany, united under Prussian leadership, was the strongest continental power in Europe. In 1873 Germany formed the loosely knit League of the Three Emperors with Russia and Austria-Hungary to prevent them from forming an alliance with France. Nevertheless, Austro-Hungarian and Russian ambitions clashed in the Balkans, where rivalries among Slavic nationalities and anti-Ottoman sentiments seethed. In the 1870s, Russian nationalist opinion became a serious domestic factor in its support for liberating Balkan Christians from Ottoman rule and making Bulgaria and Serbia quasi-protectorates of Russia. From 1875 to 1877, the Balkan crisis escalated with rebellions in Bosnia, Herzegovina, and Bulgaria, which the Ottoman Turks suppressed with such great cruelty that Serbia, but none of the West European powers, declared war.
In early 1877, Russia came to the rescue of beleaguered Serbian and Russian volunteer forces when it went to war with the Ottoman Empire. Within one year, Russian troops were nearing Constantinople, and the Ottomans surrendered. Russia's nationalist diplomats and generals persuaded Alexander II to force the Ottomans to sign the Treaty of San Stefano in March 1878, creating an enlarged, independent Bulgaria that stretched into the southwestern Balkans. When Britain threatened to declare war over the terms of the Treaty of San Stefano, an exhausted Russia backed down. At the Congress of Berlin in July 1878, Russia agreed to the creation of a smaller Bulgaria. Russian nationalists were furious with Austria-Hungary and Germany for failing to back Russia, but the tsar accepted a revived and strengthened League of the Three Emperors as well as Austro-Hungarian hegemony in the western Balkans.
Russian diplomatic and military interests subsequently returned to Central Asia, where Russia had quelled a series of uprisings in the 1870s, and Russia incorporated hitherto independent amirates into the empire. Britain renewed its concerns in 1881 when Russian troops occupied Turkmen lands on the Persian and Afghan borders, but Germany lent diplomatic support to Russian advances, and an Anglo-Russian war was averted. Meanwhile, Russia's sponsorship of Bulgarian independence brought negative results as the Bulgarians, angry at Russia's continuing interference in domestic affairs, sought the support of Austria-Hungary. In the dispute that arose between Austria-Hungary and Russia, Germany took a firm position toward Russia while mollifying the tsar with a bilateral defensive alliance, the Reinsurance Treaty of 1887 between Germany and Russia. Within a year, Russo-German acrimony led to Bismarck's forbidding further loans to Russia, and France replaced Germany as Russia's financier. When Wilhelm II dismissed Bismarck in 1890, the loose Russo-Prussian entente collapsed after having lasted for more than twenty-five years. Three years later, Russia allied itself with France by entering into a joint military convention, which matched the dual alliance formed in 1879 by Germany and Austria-Hungary.