Zamalek needed superb displays from two goalkeepers to weather an immense MO Bejaia return-leg pressure and salvage a 1-1 away draw to book a berth in the African Champions League group stage on Tuesday.
The visitors were defending a 2-0 first-leg lead but were pegged back by a determined Bejaia side, who were roared on by a passionate home crowd.
Faouzi Yaya narrowed the aggregate deficit with a 57th-minute free kick to set up a nerve-jangling finale.
Substitute Ahmed Hamoudi settled Zamalek's nerves in the dying minutes after being set up by natural winger Mahmoud Kahraba, who was guilty of spurning two gilt-edged chances after being fielded as a lone striker by Scottish coach Alex McLeish for the third straight match.
Keeper Ahmed El-Shennawi was forced off the pitch on the stroke of half-time after suffering what appeared to a muscle injury while colliding with an opponent inside the area.
The Egyptian international produced a number of brilliant stops before being substituted and his replacement Mahmoud Gennesh was equally impressive, denying a certain second-half goal with a one-handed save.
Zamalek are bidding to win the prestigious title for the first time since winning the last of their five trophies in 2002.
Bejaia control, El-Shennawi excels
The Algerians were in control outright and pressured Zamalek inside their own half, where the hosts looked to rely on their right flank in the opening minutes.
The Whites, on the other side, struggled to hold onto the ball, with the team's attackers failing to control possession.
Even so, Zamalek Kahraba could have well scored after just 10 minutes, when he latched onto a clever through pass from playmaker Ayman Hefni through to go through on goal but the ex-ENPPI man's finishing let him down.
With Zamalek retreating in fear of conceding a goal, Bejaia dictated play but struggled to threaten their opponents, partly due to the excellent performance from their four-man backline.
But real danger was signaled after 29 minutes, when an unmarked Zidane Mebarakou saw his header denied by Egypt keeper El-Shennawi.
The stop was the first in a succession of saves from the Zamalek guardian, who again came to his side's rescue nine minutes later, this time blocking another header from Waliou Ndoye.
El-Shennawi again managed to keep a clean sheet from the ensuing corner kick when he thwarted Hamzaoui's shot from inside the area before Zidane blasted high on the rebound.
The keeper, however, looked to have sustained an injury after colliding with an opponent inside the six-yard box as he was replaced by reserve goalie Gennesh.
Gennesh shines, Hamoudi kills off tie
Just nine minutes into the second half, Yaya opened the scoring when his curling free kick found the near corner after taking a slight deflection.
Gennesh proved vital to his side's progression to the last-eight shortly afterwards, producing a superb diving save to deny Lyes Boukria's header from inside the box.
In the 73rd minute, Yaya could have well made it 2-0 when attempting to pounce on a loose ball, only to see his effort miss the target.
After Kahraba, who was guilty of falling too much in the offside trap, had missed an easy chance with the goal gaping, it was substitute Hamoudi who settled the tie in the 88th minute.
A silky through-pass from Kahraba sent the surging Hamoudi through on goal, with the Basel loanee sliding past the keeper with his right foot to allow the Zamalek fans breathe a sigh of relief and ensure his side booked a place in the competition's group-stage.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)