At first glance, Turkey and Israel could not be more different. Israel is small, predominantly Jewish and post-industrial; Turkey is large, predominantly Muslim and industrial. But from the perspective of recent history the two nations have much in common.

Israel is a country of Jews expelled from eastern and central Europe, Russia and countries in the Middle East. The Turks are descended from Ottoman Muslims expelled from southeastern Europe and Russia as well as native Anatolians. In both nations, religion – though not necessarily its practice – is central to national identity. Moreover, religion plays an important role in party politics in both countries.

In both societies religious persecution has brought different populations together as members of the same nation. Religion and war have also played a role in national cohesion for both Jews and Turks. Jews banded together, first to fight the British Mandate, then for their survival against the Palestinian Arabs.

Turkey presents a similar case. Even if a majority of Turkey's inhabitants are native Turks, almost half of the population is descended from people who escaped religious persecution in Europe. During the territorial decline of the Ottoman Empire, Turkish and non-Turkish Muslims in southeastern Europe and Russia fled persecution and took refuge in Anatolia (modern Turkey).

Among these immigrants were Turks but also Albanian, Bosnian, Croatian, Hungarian Muslims, Tatars, Circassians, and Georgians. Once in Anatolia, having been persecuted due to their religion, the surviving Ottoman Turkish Muslims unified around a common Turkish-Islamic identity.

Following the defeat of the Ottoman Empire in World War One, immigrant Muslims joined the Turks to support Mustafa Kemal Ataturk's Turkish nationalist campaign to liberate Turkey from Allied occupation.

In both countries, religion's role in shaping national identity has been tempered by secularism. Israel's first premier David Ben-Gurion's vision was to create a Western secular Jewish identity that would bind Jews together. In this regard, practicing Judaism was not a prerequisite. For instance, Ben-Gurion viewed the Bible as a cultural and historical work, not as a religious codex. Yet the fact that Israel was envisioned as a state to which Jews would be welcome based on their religious identity ultimately placed limitations on secularism.

In Turkey, after Ataturk established a secular state in the 1920s, while Islam remained a major vehicle for Turkish identity, religious practice per se became less important in daily life for many.

Both countries have internal divisions. Israel's founders were mostly of European origin. Relatively higher levels of literacy and socioeconomic development – and the fact that the Ashkenazi Jews came to the country in large numbers ahead of the Sephardi Jews – kept the Ashkenazim Israel's elite well into the 1970s.

Turkey too, had a similar dichotomy. From the beginning, Turks and other Muslims from the more prosperous parts of the Ottoman Empire in Europe – who had traditionally dominated the Ottoman state – enjoyed a head start over Anatolian Muslims. The founding cadres of the republic, including Ataturk himself, born in Salonika, hailed mostly from Europe and Russia. And they formed Turkey's ruling elite well into the 1960s.

These elites enjoyed a preponderance of power until democracy facilitated opposition to their secular ideology to emerge as a political force.

By the 1970s, it had become apparent that integration of the Sephardi into the Ashkenazi-dominated society was failing. The Ashkenazi elite looked down on the Sephardi as non-Western and did not accommodate their traditional religious lifestyles. So as the Sephardi population grew it developed its own, powerful, political and anti-secular opposition power structures. One result is the Shas party, which now has 11 seats in the Knesset.

In Turkey too, reaction against secularism had an anti-elitist hue. In this regard, the rise of Islamist parties – the National Salvation Party in the 1970s, the Welfare Party in the 1990s and the Justice and Development Party in 2002 – are all rooted as much in political resentment against elitism as in rural Anatolian umbrage against secularism.

Both Jews and Turks were the object of European designs at religious homogenization of the continent and, as nation-states, both countries have a complex relationship with Europe. Both are experiencing tensions between secularism and religion. And this process, characterized by anti-elitism, has led to the creation of religious-based political parties.

In the fragmented and conflict-ridden world of Middle East politics, it is refreshing to discover that Turks and Israelis actually have much in common.

Soner Cagaptay is the director of the Turkish Research Program at the Washington Institute for Near East Policy. Asaf Romirowsky is a Campus Watch Associate Fellow for the Middle East Forum and the Israel Affairs associate for the Jewish Federation of Greater Philadelphia.