Islam has had a rich and important history in Turkey going back to the original migrations of Turkic peoples out of the Central Asian steppes and into the areas of southwestern Asia, including Anatolia. Islam reached the Turkic people via a series of invasions and raids by Muslim rulers into Central Asia where many people were captured and brought to empires in Egypt, Anatolia, Iraq and Persia to serve as enslaved soldiers. As more Turkic peoples migrated to those areas and as the descendants of the slaves, or the slaves themselves, came of age and joined the elite, they established Turkic-ruled authorities. In 1281, Osman I established a government near contemporary Izmir which expanded to become the Ottoman Empire, capturing Constantinople in 1453 and conquering Mamluk Egypt in 1517. As the premiere Muslim power, it claimed to be the inheritor of the Caliphate from the defunct Arab empires of the past. The empire's main builders--Selim I, Bayazid II and Suleyman the Magnificent, used Islam and its propagation as a tool to build their regimes' legitimacy and command the loyalty of the Muslim peoples they conquered in the Middle East. These emperors, most notably Sulayman, were keen on balancing governance in the Turkic traditions with Islamic law.
The empire faced a steady decline, beginning in the late sixteenth and early seventeenth centuries, instigating the charge that the empire should implement major reforms in all areas. Beginning with Selim III, immediately after the French Revolution, Ottoman authorities sought European advisors on political, military and economic reforms that began a steady Westernization and consequently secularization of the country's elite. Selim III's successor, Mahmut II, reduced the influence of the learned Islamic elite and built new schools with Western style secular education. Islamic courts were subjugated to the authority of the Ministry of Justice.
After centuries of European encroachment, the United Kingdom, France, Italy and Greece unsuccessfully divided up the empire and provoked the Turkish War of Independence. Secular Turkish elites fought off the intruders and established a secular republic whose history is based on the adoption of the Western-inspired reforms of the two previous centuries. They eliminated the system of religious autonomy and Islamic symbolism or status in the government, namely by abolishing the Caliphate in 1924 and subjugated all educational institutions to the state.
This process was instigated and led by Mustafa Kemal Ataturk, who believed strongly in the need to modernize, that is Westernize, Turkish society. He also believed that there needed to be a strong separation between Islam and its influence on the state.
While Islamic practice declined, Turkish identity is said to have remained strongly interwoven with the Turks identity as Muslims. Despite Ottoman reforms, the state maintained the line it was the vanguard of Islam and retained the Caliphate up until the empire's fall.
Despite the fact that Ataturk's absolutist attitude and program ended with the rise of alternative political parties, the Turkish military became the flag-bearer for secularism and has stepped in several times to protect the secular nature of the Turkish government. In 1950, the Democratic Party won the country's first multi-party elections with the support of devout Muslim voters, leading to more outward expression of Islam in public life. In 1970, the National Order Party was founded with an emphasis on Islamic identity, but was banned in 1971 by the Constitutional Court because of military pressure. After a coup in 1980, the 1983 elections brought in the Motherland Party and its democratization program that supported public expression of religious Islamic ideas. In 1995, the Islam-oriented Welfare Party won a parliamentary majority. The party was eventually forced out of government and banned by the Constitutional Court for challenging the secular nature of the state. In 2002, the Justice and Development Party came to power and as of 2011 was still in power, walking a political tightrope balancing its Islamic supporters' interests with the demands of the secularist Turkish military.
The country is virtually 99 percent Muslim, mainly Sunni, following centuries of Christian decline, migration and massacres. Jews had never been a significant population in Anatolia numerically. A long history of Sufi mystical orders remains in Turkey, mostly evident in the contemporary practices of the heterodox sect whose practitioners are called Alevis. This composes anywhere between 12 and 20 percent of the Turkish population, and thus of the Muslim population as well. Alevis complain of discrimination and are understood not to identify with the state, which despite its secular leanings supports Sunni-themed Islamic studies in the school system. Other possible reasons for their discontent are their dispersed communities and tendency to migrate to the cities and become members of the economic lower class.