My Egyptian taxi driver gave me a pitied, concerned look as I handed my cash over at Sharjah Airport. I was on my way to his homeland, to Cairo, and the conversation, as it always tends to do in the Middle East with taxi drivers, turned to football.

"I am Al Ahly, of course," he told me, betraying his allegiance to Egypt's most successful football club. I was flying to Egypt to watch Al Ahly take on Zamalek in the Cairo derby, in the biggest match in Africa, in one of the most violent football fixtures in the history of the game, in front of a 100,000 strong, perfectly partisan crowd. The previously happy taxi driver's demeanour turned dark as he handed me my change. "Do not go," he intoned gravely. "You will be killed."

He was right to be concerned. For the best part of a century Ahly and Zamalek have been fighting out vicious derbies on and off the pitch, causing death, destruction and in at least one case in the early 70s, the entire league to be cancelled. The violence forced the Egyptian government to ban derby games at each club's home ground. Now all games take place at a neutral venue. Such is the reverence and division that even Egypt's referees aren't beyond suspicion – foreign officials are now flown in to ensure impartiality.

But it is far more than just locality that rubs each set of supporters up the wrong way, and far more than pride. It is about nationalism, class and escapism. This Sunday the barely concealed latent enmity that lays dormant between fixtures will once again be brought to the fore, this time in the African Champions League, which kicks back into action. The last eight teams in arguably the world's third toughest club competition have been split in to two groups of four, with Group A throwing up the one fixture that the authorities wanted to avoid.

The roots of the rivalry can be traced back to when the British army walked the streets of Cairo. Football was almost universally regarded as Britain's only popular cultural import but it wasn't until 1907 that Egypt's first locally run club, Al Ahly, came into existence. The name translates as 'The National' and Ahly, wearing the old red colours of the pre-colonial flag, were seen as a team for the nation, a bulwark against occupation and a chance for the average man on the street to come together for a common nationalistic cause.

Zamalek, wearing white, were considered the team of the foreigner (read the British) and the outsider. It was also the club of the hated King Farouk. The team was even named in his honour before being changed to Zamalek after his abdication. The team traditionally attracted the British, their allies and the awkward squad: the authors, poets and intellectuals who were uneasy with Egypt's newfound nationalistic confidence. In the red corner you had the devout, the poor and the proud; in the white corner the liberal, bourgeois middle class. Today the divisions still remain.

"If I go to the stadium I have to go without my car as they [Ahly fans] break everything," explained the former Zamalek great and international Ayman Younis, who is now the Alan Shearer of Egyptian television, only with more personality and hair. Younis knows a thing or two about the tensions between the two sides. His knack for scoring against Ahly in the Cairo derby in the 80s and 90s made him a marked man, even to this day.

"When I was playing I had a lot of problems with Ahly fans. In 1990 I found my BMW car on its side and they signed it 'Ahly fans'. And that was when we lost, 2-0, but they remembered that I scored in the first game earlier in the season." That, however, wasn't the worst of it. "Then there was the time they attacked me in my home. I had to phone the police. 5,000 Ahly fans came to my street and shouted against me, my wife and kids, throwing things at us."

Not that the incident prompted him to re-evaluate his allegiance. For Ayman his love of Zamalek, along with its fans, transcended nearly every other impulse in his life, even religion. "Ask a Zamelek fan, 'Can you change religion?' He wouldn't answer. But you ask them can you change Zamalek, they'd say 'No!' And if you see a policeman, they won't ask you whether you are Muslim or a Christian, they'll ask you whether you are Ahly or Zamalek. It's true."

Today's player's are no different, as Mahmoud "Shikabala" Abdel Razeq, Zamalek's best player who is currently in his second spell at the club after playing briefly in Greece, explained. "I came back [to the team] because I played with Zamalek since I was very young and Zamalek is my home," he said. "The derby is like a championship in itself: if you win it you win the biggest trophy since football started in Egypt."

When I arrived at the Cairo International Stadium, it was clear the authorities weren't taking any risks. The concourse leading to the stadium was swamped with black-clad riot police and plain-clothes officers, randomly hauling out supporters and taking them away to be searched. It felt more like temporary, localised martial law than a football match. Inside, Ahly's Ultra group was already in fine voice, hours before the kick off.

"Ahly was the first ever [football club] to be 100% Egyptian so it is very nationalistic but Zamalek has changed their name so many times we sing: 'You used to be half British, you guys are the rejects'. In Arabic it's the plural of 'Small dirty houses,'" explained Asad, the organisation's leader. "The two biggest political parties in Egypt are Ahly and Zamalek. It's bigger than politics. It's more about escapism. The average Ahly fan is a guy who lives in a one bedroom flat with his wife, mother-in-law and five kids. And he is getting paid minimum wage and his life sucks. The only good thing about his life is that for two hours on a Friday he goes to the stadium and watches Ahly. That's why it is such an obligation to win every game. It makes people's lives happy. We are probably the only club in the world where we [the fans] expect to win every single game."

Which is something Ahly have had a good stab at. They've won the last four league titles (33 in all), two of the last three African Champions Leagues, enjoyed a record-breaking 55 match unbeaten run and exerted near total dominance over Zamalek in recent years. The architect of their success is Portuguese crackpot Manuel Jose, a manager who claims to be a better than his countryman Jose Morinho, and was incensed when he wasn't considered for the Portuguese national job. He was asked to step down for a few weeks last season after infuriating Egypt's religious conservatives by stripping off on the touchline during a league game in protest at a poor refereeing decision.

Yet I was lucky enough to experience that rarest of things: an Ahly defeat. Zamalek ran out 2-0 winners, causing the Ahly fans to pelt the riot police with bottles and fight amongst themselves. The shear numbers of riot police meant that it was virtually impossible for the two sets of fans to meet and fight like they used to. Instead, the violence has found a new home.

Youth team matches have been known to be a thinly veiled disguise for a resumption of hostilities ("There's always horrible fights there," admitted Asad), whilst the far less security-heavy basketball derby between Ahly and Zamalek has seen an explosion of violence courtesy of those who can't get their kick from the terraces any more. Last February saw the high water mark: a Zamalek fan was set on fire and severely burnt when Ahly's fans, distraught after their team narrowly lost 68-67, invaded the court and showered their rival's supporters, players and management with homemade Molotov cocktails.

Yet whilst the authorities struggle off the pitch, Egyptian football is currently enjoying something of a boom on it. Both Zamalek and Ahly share the record for the most African Champions League titles (five apiece), their players are coveted by some of the best leagues in the world and the national team has just won a second successive African Cup of Nations.

That moment last February, when the exceptionally talented Mohamed Aboutreika scored the only goal in the final against Cameroon, was one of the rare moments that even Zamalek fans cheered the exploits of a die hard Ahly player. But by 7.30pm on Sunday, Cairo will have forgotten that. Once again the city will part, one half painted red, the other painted white.