The Tanzimat (tanziˈmat; تنظيمات, see nizam) was a period of reform in the Ottoman Empire that began with the Gülhane Hatt-ı Şerif in 1839 and ended with the First Constitutional Era in 1876. The Tanzimat era began with the purpose, not of radical transformation, but of modernization, desiring to consolidate the social and political foundations of the Ottoman Empire. It was characterised by various attempts to modernise the Ottoman Empire and to secure its territorial integrity against internal nationalist movements and external aggressive powers. The reforms encouraged Ottomanism among the diverse ethnic groups of the Empire and attempted to stem the tide of the rise of nationalism in the Ottoman Empire. Historian Hans-Lukas Kieser has argued that the reforms led to "the rhetorical promotion of equality of non-Muslims with Muslims on paper vs. the primacy of Muslims in practice"; other historians have argued that the ability of non-Muslims to assert their legal rights decreased during this period leading to the land seizure and emigration. Part of the reform policy was an economic policy based on the Treaty of Balta Liman of 1838. Many changes were made to improve civil liberties, but many Muslims saw them as a foreign influence on the world of Islam. That perception complicated reformist efforts made by the state. During the Tanzimat period, the government's series of constitutional reforms led to a fairly modern conscripted army, banking system reforms, the decriminalization of homosexuality, the replacement of religious law with secular law and guilds with modern factories. The Ottoman Ministry of Post was established in Constantinople (Istanbul) on 23 October 1840. The reforms emerged from the minds of reformist sultans like Mahmud II (1808-1839), his son Abdulmejid I (1839-1861) and prominent, often European-educated bureaucrats, who recognised that the old religious and military institutions no longer met the needs of the empire. Most of the symbolic changes, such as uniforms, were aimed at changing the mindset of imperial administrators.