The Russo-Turkish War ends with Bulgaria regaining its independence from the Ottoman Empire according to the Treaty of San Stefano; a few months afterwards the Congress of Berlin stripped its status to a vassal principality of the Ottoman Empire.

The 1878 Treaty of San Stefano (Russian: - ; Peace of San-Stefano, - ; Peace treaty of San-Stefano, Turkish: Ayastefanos Muahedesi or Ayastefanos Antlamas) was a treaty between the Russian and Ottoman empires at the conclusion of the Russo-Turkish War of 1877-1878. It was signed at San Stefano, then a village west of Constantinople (present-day Istanbul), on 3 March [O.S. 19 February] 1878 by Count Nicholas Pavlovich Ignatiev and Aleksandr Nelidov on behalf of the Russian Empire and by Foreign Minister Saffet Pasha and Ambassador to Germany Sadullah Bey on behalf of the Ottoman Empire.According to the official Russian position, by signing the treaty, Russia had never intended anything more than a temporary rough draft, so as to enable a final settlement with the other Great Powers.The treaty provided for the establishment of an autonomous Principality of Bulgaria following almost 500 years of Ottoman rule in the Bulgarian lands. Bulgarians celebrate the day the treaty was signed, 3 March [O.S. 19 February] 1878, as Liberation Day. However, the enlarged Bulgaria envisioned by the treaty alarmed neighboring states as well as France and Great Britain. As a result, the enlargement was never implemented, being superseded by the Treaty of Berlin following the Congress of the same name that took place three months later.

The Russo-Turkish War of 1877–1878 (Turkish: 93 Harbi, lit. 'War of ’93', named for the year 1293 in the Islamic calendar; Russian: Русско-турецкая война, romanized: Russko-turetskaya voyna, "Russian–Turkish war") was a conflict between the Ottoman Empire and the Eastern Orthodox Christians coalition led by the Russian Empire and composed of Bulgaria, Romania, Serbia, and Montenegro. Fought in the Balkans and in the Caucasus, it originated in emerging 19th century Balkan nationalism. Additional factors included the Russian goals of recovering territorial losses endured during the Crimean War of 1853–56, re-establishing itself in the Black Sea and supporting the political movement attempting to free Balkan nations from the Ottoman Empire.

The Russian-led coalition won the war, pushing the Ottomans back all the way to the gates of Constantinople, leading to the intervention of the western European great powers.

As a result, Russia succeeded in claiming provinces in the Caucasus, namely Kars and Batum, and also annexed the Budjak region. The principalities of Romania, Serbia, and Montenegro, each of which had had de facto sovereignty for some years, formally proclaimed independence from the Ottoman Empire. After almost five centuries of Ottoman domination (1396–1878), an autonomous Bulgarian state emerged with the help and military intervention of Russia: the Principality of Bulgaria, covering the land between the Danube River and the Balkan Mountains (except Northern Dobrudja which was given to Romania), as well as the region of Sofia, which became the new state's capital. The Congress of Berlin in 1878 also allowed Austria-Hungary to occupy Bosnia and Herzegovina and Great Britain to take over Cyprus.

The initial Treaty of San Stefano, signed on 3 March 1878, is today celebrated on Liberation Day in Bulgaria, although the occasion somewhat fell out of favour during the years of Communist rule.