To avoid this the sultan agreed to make Serbia a vassal state, semi-independent but nominally responsible to the Porte. In mid-1815, the first negotiations began between Obrenović and Marashli Ali Pasha, the Ottoman governor. The result was acknowledgment of a Serbian Principality by the Ottoman Empire. Although a vassal state of the Porte (yearly tax tribute), it was, in most respects, an independent state. By 1817, Obrenović succeeded in forcing Marashli Ali Pasha to negotiate an unwritten agreement, thus ending the Second Serbian uprising. The same year, Karađorđe, the leader of the First Uprising (and Obrenović's rival for the throne) returned to Serbia and was assassinated by Obrenović's orders; Obrenović subsequently received the title of "Prince of Serbia". During the "intermezzo period" ("virtual autonomy" – the negotiation process between Belgrade and Constantinople 1817–1830) Prince Miloš Obrenović I secured a gradual but effective reduction of Turkish power and Serbian institutions inevitably filled the vacuum. Despite opposition from the Porte, Miloš created the Serbian army, transferred properties to the young Serbian bourgeoisie and passed the "homestead laws" which protected peasants from usurers and bankruptcies. New school curriculum and the re-establishment of the Serbian Orthodox Church reflected the Serbian national interest. Unlike the Serbian medieval tradition, Prince Miloš separated education from religion, on the grounds that he could oppose the Church through independent education (secularism) more easily. By that time the Great Academy in Belgrade had been in operation for decades (since 1808). The Akkerman Convention (1828), the Treaty of Adrianople (1829) and finally, the Hatt-i Sharif (1830), formally recognized the Principality of Serbia as a vassal state with Miloš Obrenović I as its hereditary Prince.