Holders Zamalek needed a last-gasp goal from Mostafa Fathi to scrape into the Egypt Cup last eight with a 2-1 victory over Ittihad El-Shorta and Cairo rivals Ahly also went through after overcoming Haras El-Hodoud with the same scoreline on Tuesday.
Fathi, who was linked with a loan move to Italian side Bologna before Zamalek reportedly rejected the offer, made a trademark surging run towards the area in the fifth minute of stoppage time, sneaking in between two challengers to place a beautiful right-footed low shot into the bottom corner.
Midfielder Ibrahim Abdel-Khalek put Zamalek ahead on the quarter-hour mark with a looping shot from inside the area before El-Shorta's Mostafa Shammama converted a penalty on the stroke of halftime to restore parity.
Zamalek, who are eyeing a fourth consecutive cup triumph, wasted several goal-scoring chances against El-Shorta, who were relegated from the Egyptian Premier League this season, before the 22-year-old Fathi came to their rescue just before the final whistle.
Earlier in the day, Egyptian champions Ahly continued their bid towards their first domestic double in nine years after claiming a 2-1 win over Haras El-Hodoud in a scrappy last-16 game.
Veteran striker Emad Meteb, who was handed a rare starting berth, converted a penalty on the half-hour mark to put his side ahead before midfielder Amr El-Sulaya made it 2-0 in the 66th minute.
Meteb fired low into the bottom corner past the despairing dive of the keeper after a penalty was awarded for a needless handball on an El-Hodoud player.
El-Sulaya, a fringe player who was also included in the starting line-up due to the absence of some key players, let fly from distance as his powerful shot bounced off the keeper and into the corner of the net.
El-Hodoud, who famously beat Ahly in the Egypt Cup final in 2009, pulled one back when striker Mohamed Farouk converted a penalty following a handball by Ahly's full-back Mohamed Hani with eight minutes remaining but it was too little, too late.
The Alexandria-based club were also relegated from the Premier League, a competition Ahly won for a ninth time in 10 seasons.
Ahly have not won the domestic double since winning the league and cup in 2007. They were beaten by bitter foes Zamalek in the Egypt Cup final last year.
The Red Devils next face Smouha, who finished third in the league, while Zamalek take on Ittihad of Alexandria in the cup quarter final.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)