Two years ago, on 14 October 2005, a major religious riot between Christians and Muslims broke out in the backstreets of Alexandria. An angry mob spilled out of a mosque during Ramadan and began attacking the large Coptic church of Mar Girgis - St George - on the other side of the road.
Tension between the two communities in Egypt had been high ever since the US invasions of Afghanistan and Iraq. When George W Bush used the word "crusade", it implicated the Copts, in the eyes of some Muslims, in a wider Christian assault on the Muslim world. The immediate cause of the violence, however, was a play that had been mounted in the church about resisting conversion to Islam - part of a programme of summer activities for the Coptic youth organised by the local parish priest. When a video of the play, made by the proud father of one of the actors, was found on the hard drive of a laptop that he had inadvertently sold to a Muslim hardliner, trouble quickly escalated.
In the days that followed the publication of the first articles about the play in the Islamist press, and the distribution of DVDs of the performance around the mosques of Alexandria, angry Muslims went on the rampage, believing that the play criticised Islamic beliefs and denigrated the Prophet. Stones and Molotov cocktails were thrown at Coptic properties, windows were broken, six churches were trashed, Coptic jewellery shops were looted, and two men were killed: one a Christian, one a Muslim. Many more were injured.
At one point, a party of 150 Coptic girls who come to Mar Girgis for religious instruction was besieged within the church by a large mob, and a potentially horrific situation was avoided only after the police belatedly answered a distress call from the parish priest, Abouna Augustinos. Tear gas and water cannon had to be used before the mob finally dispersed. Four more Copts were knifed as they came out of church services the following Sunday. "What happened that week has left a permanent scar," I was told by Dr Kamal Siddiq, a Coptic dermatologist who, like many, was forced into hiding during the rioting. "We used to have peaceable relations with our neighbours. But in this atmosphere any small incident can instantly escalate."
Now, however, an initiative has been launched that brings Coptic Christians together with young members of al-Ikhwan, or the Muslim Brotherhood, to ensure that such misunderstandings are not repeated. One of the events that has been planned is a play in which young Copts and Muslim Brothers perform side by side. The man behind the play, Youssef Sidhom, is the editor of Watani, Egypt's leading Coptic news paper. He believes that dialogue between the two faiths is a pressing necessity. "After the success of the Muslim Brothers in the recent elections we can no longer ignore them," he says. "We need to enter into dialogue, to clarify their policies towards us, and end mutual mistrust."
The dilemma faced by the Copts reflects a larger question now facing western policymakers. Throughout the Muslim world, political Islam is on the march. In the past three or four years, almost everywhere that Muslims have had the right to vote - in Lebanon, Pakistan, Palestine, Turkey, Egypt and Algeria - they have voted en masse for the religious parties in a way they have never done before. The only two exceptions to this rule are Morocco and Jordan, the latter in an election marked by accusations of mass vote-rigging.
In countries where the government has been most closely linked to US policies, the rise of political Islam has been most marked: in Pakistan the religious parties, which used to gain only 3 per cent of the vote, have been polling around 20 per cent. Equally, in the 2006 election in Palestine, Hamas roundly defeated the blatantly corrupt and US- supported Fatah.
It has long been an article of faith for the neocons that bringing democracy to the Middle East would do away with the Islamists in the same way that the arrival of democracy saw off the communists in eastern Europe. In reality, while US foreign policy since 9/11 has indeed succeeded in turning Muslim opinion against the decadent monarchies and corrupt nationalist parties that have ruled the region for the past 50 years, Muslims, rather than turning to liberal secular parties, have lined up behind the parties that have stood up against US intervention. The religious parties, in other words, have come to power for reasons largely disconnected from religion.
Nowhere has the march of the Islamists been more steady than in Egypt: at the last general election in 2005, members of the nominally banned Muslim Brotherhood, standing as independents, saw their representation rise from 17 seats to 88 in the 454-seat People's Assembly, despite reports of systematic vote-rigging by President Mubarak's ruling National Democratic Party (NDP). At the same time, the face of the country has visibly changed: almost all Muslim women now wear the hijab and reject make-up, at least partly as a statement of political defiance against the west and western-backed regimes. This is a major change: as recently as the early 1990s the great majority of Egyptian women did not cover their hair.
The US response to gains made by the Islamists has been to retreat from its previous push for democracy when the "wrong" parties win - something that was most apparent in the notably undemocratic US response to the rise of Hamas in Palestine. This instinct was also at work in the US- and UK-brokered "rendition" of the Pakistani Muslim League leader Nawaz Sharif to Saudi Arabia, in order to leave the electoral field clear for Benazir Bhutto - in effect imposing a single candidate on the electorate, until Musharraf's emergency changed all political calculations and Sharif was allowed to return. The US has also retreated from backing democracy in Egypt. Many of the Brotherhood's leading activists and business backers, as well as Mubarak's principal opponent in the 2005 presidential election, are now in prison. In September, four Egyptian newspaper editors were given prison sentences for libelling Mubarak and the NDP.
But the Egyptian Copts - the ancient Christian community who make up roughly 15 per cent of Egypt's population - don't have the luxury of looking the other way. They realise that with the decline in popularity of the NDP, they will have to learn, for better or worse, to live with the Islamists.
* * *
The Copts have long suffered petty discrimination. But the revival of the Islamists has made their position more uneasy and their prospects more uncertain than they have been for centuries. Like other Christian sects in the Middle East, the Copts now find themselves caught between their co-religionists in Europe and the US, and their strong cultural links with their compatriots in the east. As at the time of the Crusades, it is the eastern Christians who are getting it in the neck for what the people perceive as the anti-Islamic policies of the west.
Throughout the 1990s, Copts, especially in Upper Egypt, were targeted by the Islamist guerrillas of the Gama'a al-Islamiyya. In April 1992, 14 Copts were shot in Asyut Province for refusing to pay protection money. There followed a series of crude bombs outside Coptic churches in Alexandria and Cairo. In March 1994, militants attacked the ancient Coptic monastery of Deir al-Muharraq near Asyut; two monks and two laypeople were shot dead at the monastery's front gate. "In the last few years many churches were burned, many of our priests and laymen were killed," I was told by one Coptic monk. "Every day, there are death threats. The police arrest no one, though they know very well who does this."
Since then, however, the Gama'a has renounced violence, and the Islamists have concentrated on reaching power through the ballot box. At the same time, the Copts' political influence has slowly diminished: there is still one Coptic provincial governor and there are two Coptic ministers, one of them a popular technocrat nephew of the former UN secretary general Boutros Boutros-Ghali. But, in contrast to the situation under Nasser and Sadat, there are no Coptic senior policemen, judges, university vice-chancellors, or generals.
Yet if the Copts face a certain amount of institutional discrimination, Mubarak himself has been largely sympathetic to the community, making Christmas a national holiday and freeing up the rules on building new churches. The Copts know that things could get much worse for them if Mubarak falls and the Brothers come to power.
Samir and Nabil Morcos are among those Copts who have recently begun a series of public discussions with the younger generation of the Brothers. Many of these, they say, are moderate in their outlook, and wish to turn al-Ikhwan into a Muslim equivalent of a European Christian Democratic party, similar to the AKP in Turkey. They believe there is a major divide between the younger Brothers and the old guard, who share the illiberal and intolerant outlook of the Brotherhood's founder, Hassan al-Banna. They also point out the role played by the Brothers in the Alexandria riots, where they acted quickly to calm the rioters and, in some cases, even formed human chains to stop the rioters entering Coptic districts.
After Coptic intellectuals recently appeared on al-Jazeera to discuss citizenship and the rights of religious minorities under an Ikhwan government, the Brothers promised to produce a policy document on the subject. "The Copts are much more vocal in their claim for rights these days," says Samir Morcos, who took part in the debate. "We have been expressing our fears to the political bureau of al-Ikhwan, and discussing new interpretations of the various Islamic texts about minorities. Dialogue is always a positive thing. We have discovered a whole new generation who are doing their best to find a new fusion of democracy, modernity and Islam. A lot of them are secular Muslims - former leftists who have moved intellectually towards a rediscovery of Islamic tradition. In many ways, they are an Islamic version of the neocons."
"The Brothers are not a solid block," agrees Nabil. "The recent growth of the Brotherhood has largely come out of the failure of Nasserism. Many of the younger Brothers are there not for explicitly religious reasons, but because they are struggling to find new answers to the chronic problems the Arab world is facing. We want to be part of that discussion. As Egyptians, it is important that we all struggle against poverty, lack of democracy and social justice."
At the offices of Watani, Youssef Sidhom is also involved in opening up dialogue. In the past few years there has been a growing polarisation in Egyptian society, he says with concern. A generation ago, most Egyptians chose names for their children which could be either Christian or Muslim. Now children's names - such as Mohammed or Girgis (George) - immediately define their sectarian affiliation. Likewise, the near-universal adoption of the hijab by Muslim women has left Coptic women dangerously exposed and sometimes subject to threats and abuse. In the face of growing discrimination, the Copts have tended to form their own schools and social clubs, keeping their distance from the Muslim majority.
This is something the Coptic clergy - every bit as radically conservative as their Muslim counterparts - have often encouraged, but Sidhom believes it is an extremely dangerous development. "In schools and universities, in sports and in cultural activities, Muslims and Christians no longer mix together," he says, "and these attitudes are encouraged by the religious leaders of both the churches and mosques. Even if there are friendships across the divide, there is little trust. If we continue to allow the Coptic youth to be separated from their fellow citizens, there will be a growth of mistrust on either side. But with dialogue, both sides are surprised to find how much they have in common."
Sidhom has given one of the more progressive Muslim Brother MPs a column in his paper, allowing the Copts to ask him questions and air their anxieties. "There was horror when the column first appeared. But it has allowed us to ask about the Brotherhood's attitude not only to the Copts, but to such issues as women, banking and terrorism," says Sidhom. "Dialogue is not the same as surrender - we differ on many issues and want a secular state not an Islamic one. But what we really need is radical constitutional reform. As long as the Brothers are the only opposition to Mubarak and the NDP, this situation is going to get worse."
* * *
What is happening in Cairo may be a useful model of how to engage with the ever more powerful democratic religious parties across the Islamic world. Right-wing commentators such as Melanie Phillips, Michael Gove and Martin Amis tend to see the march of political Islam as the triumph of an anti- liberal "Islamofascism" that aims to conquer the west through jihad and establish a universal caliphate. Although some Islamic ideologues do speak in these terms, to see this as the principal or even a major thrust in political Islam is ignorant and simplistic.
The truth is more complex. First, by concentrating on the violent fringe of jihadis, we in the west have in many ways missed the main story - the rise of a vast and largely democratic force. Second, while determination to resist western hegemony in the Muslim world is an important driving force in political Islam, the movement has local causes, too. Some - such as the promotion of Wahhabi Islam by Saudi madrasas - are religious, but most are not. In Egypt, as in many countries, the parties of political Islam contain a broad spectrum of anti-government opinion, and it is often entirely secular factors that have brought them to power. In Palestine, the open corruption and greed of the PLO led many to support Hamas. In Lebanon, the rise of Hezbollah has been the result of Hasan Nasrallah's status as the man who gave the Israelis a bloody nose, who compensates the people for war damage and provides social services, just as Hamas does in Gaza.
The same is true of the rise of political Islam in Pakistan, where the Islamist parties have benefited from the unpopularity of the feudal and military elites that have held power since 1947. When I interviewed Abdul Rashid Ghazi in the Red Mosque shortly before his death in the storming of the complex in early July, he returned again and again to issues of social justice. "We want our rulers to be honest people," he repeated. "But now the rulers are living a life of luxury, while thousands of innocent children have empty stomachs and can't even get basic necessities."
Youssef Boutros-Ghali, Egypt's Coptic minister of finance, also believes the rise of political Islam is largely due to secular factors: "The success of the Brothers does not come expressly from religious sources. Their popularity is primarily a result from our [the NDP's] unpopularity - they are quite simply the main focus of opposition to us. Our society is in transit, and transitions are not painless. But give me five years of high growth and prosperity, and a better distribution of income, and I guarantee you that this problem would roll back completely."
The only exceptions to the litany of Islamist electoral successes are significant, and confirm Boutros-Ghali's instincts: in the relatively stable, prosperous and peaceful kingdoms of Jordan and Morocco the Islamist tide has been checked at the ballot box. In the case of Morocco, the mildly Islamist Justice and Development Party was expected to sweep the polls in November, but ended up coming second behind the secular-nationalist, pro-monarchist Istiqlal (Independence) Party.
Either way, it is only by opening dialogue with the different Islamist parties across the Muslim world that we are likely to find those with which we can work. Like the Copts, we may well discover in talking to them that less separates us than we at first imagined.
William Dalrymple is the author of "From the Holy Mountain: a Journey in the Shadow of Byzantium" (Harper Perennial, £9.99). His latest book, "The Last Mughal: the Fall of a Dynasty, Delhi, 1857" (Bloomsbury, £8.99), recently won the Duff Cooper Prize. www.williamdalrymple.com 
Egypt’s Christian history
1st century AD Christianity arrives from Palestine
200 Egypt is largely Christian; the Church of Alexandria is second in importance only to Rome
641 Arabs invade; over the next 200 years most Egyptians convert to Islam
13th century Following the Crusades, Copts are persecuted by Egypt's Mamluk rulers; forced conversions take place
1952 to present After Gamal Abdel Nasser comes to power in a nationalist coup, Copts are increasingly marginalised. Discrimination worsens with the rise of Islamism in the 1990s
Research by Rachel Aspden