The Ottoman Empire declared war on 6 October 1768 after Russian troops burnt the Turkish town of Balta. By 1771 the Russians had occupied Moldavia, Wallachia and the Crimea, but the Pugachev Revolt at home forced them to end the war by the Treaty of Kutchuk-Kainardji in 1774, before the Ottoman Empire was completely defeated.