During the 18th and 19th centuries, the Ottomans and Russians fought a series of wars over territory around the Black Sea and the Balkans. As the Ottoman Empire slowly declined, the Russians extended their control over former Ottoman territories around the Black Sea.
Russia sought access to warm water ports and entry into the Mediterranean through the Ottoman controlled Dardanelles. Russian imperial ambitions in the Balkans also brought them into conflict with the Ottomans and Austria.
In 1696, while much of the Ottoman army was fighting against the Holy League led by Austria in the Balkans, Russia under Peter the Great took the port of Azov on the Azov Sea. Russia and the Ottomans signed a separate treaty in 1700 that reaffirmed the terms of the earlier Treaty of Karlowitz of 1699, whereby the Ottomans lost territory in the Balkans and Poland moved into the Ukraine.
Russia and Austria joined together to attack the Ottomans in the mid-18th century, but under the Treaty of Belgrade in 1739 the Ottomans regained Belgrade, which they had lost in 1718.
However, the Russians slowly realized their ambitions for access to Azov and then the Black Sea. Under the Treaty of Belgrade, Russia gained some land along the Azov, but they were forbidden to fortify the area.
Following their defeat in the Russo-Turkish War of 1768–1774, the Ottomans under Sultan Mustafa III signed the Treaty of Kuchuk Kainarji (in present-day Bulgaria), with Russia led by Catherine II. Under this treaty the Russians gained ports along the Crimean and territory in the Caucasus.
The Ottomans were also forced to grant independence to the Crimean Khanate that Russia formally annexed in 1783. Russia also gained the right to serve as the so-called protector of Orthodox Christians in the Ottoman empire, thereby increasing its involvement in the domestic affairs of the Ottoman state.