Ahly and Zamalek overcame second-tier sides to reach the Egypt Cup round of 16 on Wednesday, four days before they meet in the first Cairo derby of the season in the Egyptian Premier League.
Holders Ahly needed a late goal from Congolese striker Walter Bwalya to spare their blushes against Nasr, who are struggling at the wrong end of the table in the second division, while Zamalek came from behind to earn a 3-1 victory over 10-man Haras El-Hodoud.
Both sides fielded weakened teams to keep their prized assets fresh for the derby.
In Suez, Zamalek were taken by surprise when Hassan Youssef fired El-Hodoud to a ninth-minute lead, his angled low shot beating the keeper at the far post from the edge of the area after some slack defending.
However, their hopes of keeping their advantage intact suffered a blow when Ahmed Qattawi received a straight red card for a last-man foul on Moroccan winger Hamid Ahadad, with Youssef Ibrahim curling home the resulting free kick in off the bar on 19 minutes.
Central defender Mahmoud Alaa converted a penalty in the 51st minute after Ahadad was felled in the area and tucked away another spot-kick eight minutes past the hour mark to kill off Hodoud's hopes and ensure a smooth progress to the last 16, where Zamalek will face Ismaily.
In Alexandria, Ahly spurned a slew of goal-scoring chances before breaking the deadlock on the stroke of halftime, veteran winger Walid Soliman rifling home a volley after a half-hearted defensive clearance fell into his path.
Ahmed El-Seidi brought Nasr level against the run of play in the 54th minute when he popped up unmarked at the far post to slot home a diagonal low cross that eluded a couple of defenders and the keeper.
However, Bwalya had the last word when he netted only his second goal since his January arrival with seven minutes remaining, firing home a loose ball from inside the area to set up a round of 16 game against Enppi.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)