I developed an aversion to secularism in my early 20s. During my university days, in the early 70s, I became the General Secretary of the Federation of Students' Islamic Societies (FOSIS). Like most members of FOSIS, I was strongly influenced by the Muslim Brotherhood of Egypt and Jamaat-e-Islami of Pakistan. These organisations preached a simple message: Islam Good; Secularism Bad. So, like other members of the 'Islamic movement', I came to think of Islam and secularism as two fuming bulls perpetually at loggerheads with each other.

It was only when I started to read Islamic history that I realised things were not so black and white. Secularism, I discovered, was by no means alien to Islam. Not only does it have a strong presence in Islamic history, but secularism played an integral part in shaping classical Islamic thought. While it was never articulated as a clear and distinct separation of religion and political power, it has been frequently discussed and debated, in various disguises, by many Muslim scholars and thinkers. I developed an aversion to secularism in my early 20s. During my university days, in the early 70s, I became the General Secretary of the Federation of Students' Islamic Societies (FOSIS). Like most members of FOSIS, I was strongly influenced by the Muslim Brotherhood of Egypt and Jamaat-e-Islami of Pakistan. These organisations preached a simple message: Islam Good; Secularism Bad. So, like other members of the 'Islamic movement', I came to think of Islam and secularism as two fuming bulls perpetually at loggerheads with each other.

It was only when I started to read Islamic history that I realised things were not so black and white. Secularism, I discovered, was by no means alien to Islam. Not only does it have a strong presence in Islamic history, but secularism played an integral part in shaping classical Islamic thought. While it was never articulated as a clear and distinct separation of religion and political power, it has been frequently discussed and debated, in various disguises, by many Muslim scholars and thinkers.

To my surprise, I learnt that religious states were an exception rather than a rule in Islamic history. The great Umayyad and Abbassid empires (6611258) were based on personal and authoritarian rule. Their obeisance to religion was purely symbolic. At best, they were 'semi-secular' states. With the sole exception of the Fatimid state in Egypt and Syria (9091171), the states which came into existence after this period were even more secularised. The Fatimid rulers were fanatical Isma'ili (a variation of Shia) but even they were unable to impose their faith on the state. Most of their population belonged to the Sunni faith; and, for practical reasons, they often separated affairs of the state from Isma'ili theological considerations.

The movement to separate religion from politics began early in Islamic history. In classical Islam, it was the rationalists, who tended largely to be philosophers but also included scientists, poets and administrators, who desired a respectable distance between religion and politics. Known as the Mutazalites – literally the Separatists – these thinkers were against strict, legalistic faith based solely on the notion of a Divine Law (the Shariah) and worked to transform Islam into a more humanistic religion. They argued that with reason alone one could know how to act morally; and by corollary, there was no necessity to combine religion and statecraft. The school emerged in the ninth century during the time of al-Kindi, known as 'The First Philosopher of the Arabs', who is accredited as its founder. The Mutazalites boasted such philosophers of distinction as al-Farabi, who argued for a republic ruled by philosophers.

The Mutazalites were pitted against the Asharites, founded by the tenth century theologian al-Ashari. The Asharites rejected the idea that human reason alone can discern morality and argued that it was beyond human capability to understand the unique nature and characteristic of God. The state, the Asharites argued, had an important part to play in shaping the morality of its citizens; hence religion and politics could not be separated. The Asharites School had the support of giants like the theologian al-Ghazzali, the mathematician and physicist Fakhr al-Din Razi; and the great fourteenth-century historian and sociologist, ibn Khaldun.

To a very large extent, the history of Islam during the classical period, from the seventh to fourteenth century, can be seen as one gigantic struggle between the Mutazalites and the Asharites. It was the clear-cut victory of the Asharites that ensured that Muslim societies tended to see religion and politics as two sides of the same coin. Muhammad Iqbal, the great twentieth-century South Asian poet and philosopher, summed up this position when he declared that "if religion is separated from politics you are left with the terror of Ghengis Khan."

Iqbal was a mystic. I, on the other hand, after a long period of studying Islamic history and classical thought, emerged as a rationalist, a contemporary follower of the Mutazalite philosophy. And, as a rational sceptic, I wanted to know what was really bothering ordinary Muslims – as opposed to hardline followers of the Islamic movement – about secularism.

My travels in the Middle East soon clarified one aspect of the problem. Secularism in the Muslim world was associated with oppression and suppression of tradition and religious people. In Egypt, the Muslim Brotherhood was brutally suppressed by the secular regime of Gamal Abdul Nasser, and its leaders tortured and executed. The Ba'athist regimes in Syria and Iraq were even more vicious. Secularist political parties, such as the National Liberation Front in Algeria and the Constitutional Party in Tunisia, openly advocated anti-religious policies and persecuted anyone who identified with Islam.

Secularism in the Muslim world was always presented as an ideology in direct opposition to religion. As such, it became a force for exclusion rather than inclusion. Secularists not only denigrated religion but went out of their way to marginalise the vast majority of traditional Muslims from both politics and economic opportunity. The religious people I met during my journeys argued, not surprisingly, that secularism had reduced Islam to servant status, there only to be manipulated by those who hold the vast majority and their religion in utter contempt.

There was another problem. Traditional Muslims often equated secularism with Europeanisation. It was seen as a product of Europe, a product that retains its essential Eurocentric core. Under secularism, the European ideas of liberty and freedom become the only basis for the future of Muslim societies and cultures because they are seen as the only universal standard by which liberty and freedom are assessed and understood. Thus, to embrace secularism in its totality, I was repeatedly told, amounts to becoming an appendage of western civilisation: it involves giving up the Islamic notions of community, where absolute freedom of the individual is restricted by public interest and concerns of the community, and certain moral principles which play an important part in shaping individual, social and cultural behaviour. Moreover, the distinct history of Islam is subsumed into the 'Universal River' of secularist, western history. So, for traditional Muslim communities, standing up to secularism was seen as a necessity for cultural survival and for preserving certain cherished notions of Muslim identity.

My travels in Turkey provided numerous illustrations of these concerns. When, at the beginning of the twentieth century, Kemal Ataturk introduced secularist reforms in Turkey, he presented secularism as a superior ideology and pitted it against a perceived inferior religion.

Islam, he declared, was a clear hindrance to progress and there should be no remnants of Islam in Turkey. The Ottoman Caliphate must be abolished; schools, colleges and universities must be Europeanised; traditional scholars must be humiliated; and European policies and administration must be introduced. Europe had to be imitated in minute detail, up to and including how one dressed and behaved. So, Ataturk banned beards, turbans and the hijab, ordered everyone to wear European dress, and appointed the military as the guardians of Turkish secularism. He replaced Ottoman history based on religious community with a 'national history' he hoped would replicate the history of the West. "There is only one civilisation", he declared, the European civilisation. And a secularist society must "imitate it in all respects".

Muslim attitudes towards secularism began to change at the beginning of the 90s. The failure of the theocratic state in Iran, and the Islamic movements in general, led many Muslim scholars to rethink their position on secularism. Writers and thinkers in Iran, Pakistan and Turkey began to argue that secularism had a role to play in Muslim societies. But if Muslims were to accept secularism, both secularism and religion had to be reformulated.

Conservative religion based on the notion of monolithic Truth and immutable Divine Law cannot tolerate secularism. But a notion of secularism that is equated with atheism, Europeanisation and an absolute notion of freedom cannot be accommodated with religious societies either. An acceptable notion of secularism had to be based on Islamic history and the teachings of Islam itself.

Throughout the 90s, the noted Indian Muslim reformer and campaigner Asghar Ali Engineer, for example, argued that both 'Islam and secularism have to be liberalised'. The Koran, Engineer suggested, provides support for 'liberal or non-theistic secularism'.

Moreover, the constitution developed by Muhammad in Medina can also be used to shape a secularist society. Engineer pointed out that Indian Muslim scholars 'drew the inspiration for creating a composite secular nation in India from the Prophet's Convent in Medina'. Muslims in other countries can use the same religious basis for developing a 'liberal secular political dispensation'.

Other thinkers sought philosophical routes to Islamic secularism. For example, Abdolkarim Soroush, the well-known Iranian philosopher and reformist, used the thought of classical Mutazalite thinkers to develop a philosophical argument. He argued that 'extra-religious concerns', such as democracy, human rights and pluralism, should take 'logical precedence' over 'intra-religious concerns', such as the role of religious scholars and notions of religious truths. This has been the case in much of Islamic history. Genuine theocracies, such Iran, where political power is in the hands of the religious scholars, and Saudi Arabia, where there is an alliance between the monarchy and religious scholars, Soroush suggested, are a modern aberration. Both the logic of Islamic history and the logic of a globalised world dictate that religious and political power should be totally separated within Islamic societies.

Many other thinkers and scholars now argue that Muslims should see secularism not as a theology of salvation, a la Ataturk, but as a pragmatic concern. During the 90s, I had a long-running argument with my friend Iftikar Malik, a British Pakistani political scientist and historian, and author of Islam and Modernity. Both of us were concerned about the sharp increase in religious feuds and violence in Muslim societies. The only way to solve this problem, Malik argued, was to separate huqooq Allah (the rights of God) from huqooqal ibad (the rights of people). The rights of God should be left to the individual and his conscience; the state should concern itself only with the rights of the people. In this context, secularism isn't so much the opposite of sacred as the antithesis of chauvinism, ethnocentrism and fanaticism. A Muslim secularist wouldn't be disrespectful towards Islam – indeed, he or she may be a devout believer – but equally respectful to all religions, Malik suggested. And religious symbolism, such as the hijab, would be treated for what it is: a symbol. It will not be seen as a threat to the 'secular' nature of the state but as an exercise in the public expression of 'the rights of God'. "So secularism comes not at the expense of religion but as a method for reinterpreting and revisiting religion itself," Malik declared.

Such arguments are now gaining ground in Muslim societies. Ironically, Muslim societies may be led towards a reformulated secularism and a reformed Islam by Turkey – just as Malik has been predicting for so many years. Secularist Turkey has a bona fide Islamic government that is committed both to the principle of separation of religion and politics and to bringing the ethics and morality of Islam into public affairs. Many in the Muslim world look towards Turkey as an ideal democratic, liberal, secular and Islamic state. If Turkey joins the European Union, its status as the model for other Muslim states to imitate will be confirmed. Thus, a new synthesis between Islam and secularism may yet emerge.