Before adopting Islam a process that was greatly facilitated by the Abbasid victory at the 75 battle of Talas, which ensured Abbasid influence in Central Asia the Turkic peoples practiced a variety of shamanism. After this battle, many of the various Turkic tribes including the oguz Turks, who were the ancestors of both the Seljuks and the Ottomans gradually converted to Islam, and brought the religion with them to Anatolia beginning in the 11th century. In the Ottoman Empire, in accordance with the Muslim Dhimmi system, Christians were guaranteed limited freedoms such as the right to worship but were treated as second class citizen. Christians and Jews were not considered equals to Muslims: testimony against Muslims by Christians and Jews was inadmissible in courts of law.
They were forbidden to carry weapons or ride atop horses, their houses could not overlook those of Muslims, and their religious practices would have to defer to those of Muslims, in addition to various other legal limitations. The system commonly known as devisrime was effectively used in the Ottoman Empire for centuries: in this system a certain number Christian boys, mainly from the Balkans and Anatolia, were periodically conscripted before they reached adolescence and were brought up as Muslims.These selected boys were trained either in the arts of statecraft or in the military to form the ruling class and the elite fighting force, janissaries, of the empire.The Ottoman Sultan Mehmed II allowed the local Christians to stay in Constantipole after conquering the city in 1453, and to retain their institutions such as the Greek orthodox patriachate. In 1461 Sultan Mehmed II established the Armenian patriachate of constantipole. Previously, the Byzantines considered the Armenian Church as heretical and thus did not allow them to build churches inside the walls of constantiple. In 1492, when the Muslims and Sephardic jwes were expelled from Spain during the Spanish institution, the Ottoman Sultan Byazeid11 sent his fleet underKemal ries to save them and granted the refugees the right to settle in the Ottoman Empire. The state's relationship with the Greek orthdox church was largely peaceful, and recurrent oppressive measures taken against the Greek church were a deviation from generally established practice. The church's structure was kept intact and largely left alone but under close control and scrutiny until the Greek war of independence of 1821–1829 and, later in the 19th century, the rise of the Ottoman constitutional monarchy, which was driven to some extent by nationalistic currents, tried to be balanced with Ottomanism. Other Orthodox churches, like the Bulgarian orthodox church, were dissolved and placed under the jurisdiction of the Greek Orthodox Patriarchate, until Sultan Abdulaziz established the Bulgarian exarchate in 1870 and reinstated the autonomy of the Bulgarian Church. Similar millets were established for the Ottoman Jewish community, who were under the authority of the Ottoman chief Rabbi; the Armenian orthodox community, who were under the authority of a head bishop; and a number of other religious communities as well.