In mid-1815, the first negotiations began between Miloš Obrenović and Marashli Ali Pasha, the Ottoman governor. Miloš Obrenović got a form of partial autonomy for Serbs, and, in 1816, the Turkish Porte signed several documents for the normalization of relations between Serbs and Turks. The result was the acknowledgment of the Principality of Serbia by the Ottoman Empire. Miloš Obrenović received the title of Prince of Serbia. Although the principality paid a yearly tax to the Porte and had a garrison of Turkish troops in Belgrade until 1867, it was, in most other matters, an independent state. Under the grandson of Miloš's brother, Milan, Serbia gained formal independence in 1878 under the Treaty of Berlin.