Ahly s players celebrate after winning the CAF Super Cup football match between Egypt s Ahly and Morocco s Raja Club Athletic (Raja Casablanca) at the Ahmad Bin Ali Stadium in the Qatari city of Ar-Rayyan on December 22, 2021 (AFP)
Just when Raja where about to celebrate a looming win, substitute Taher Mohamed Taher struck in the 90th minute to spark jubilant scenes at Al Rayyan Stadium.
Hamid Ahadad, who played against Ahly while at Cairo rivals Zamalek last season, gave Raja a 13th-minute lead as the Red Devils looked porous at the back and toothless upfront.
But Ahly were reinvigorated following the second-half introduction of wingers Taher and Ahmed Abdel-Kader as well as striker Mohamed Sherif.
In a nerve-wracking shootout, both sides converted their five spot kicks with some powerful shots that both keepers were unable to stop even when they guessed right.
However, Ahly settled the tie in their favour in the sudden death, with Akram Tawfik converting his penalty and Raja's Abdelilah Madkour blasting his effort astonishingly high over.
Ahly, who won back-to-back African Champions League and Super Cup titles, are now five Super Cup triumphs clear of nearest challengers Zamalek.
Ahly coach Pitso Mosimane stuck to his new 3-4-3 formation, which he applied to devastating effect in the early stages of the Egyptian Premier League as the team collected maximum 18 points from their opening six games.
However, Raja's Belgian coach Marc Wilmots appeared to outfox Mosimane, with the Moroccan side sitting back to soak up pressure and then exposing gaps down the flanks on breakaways.
They went ahead from one such move after 13 minutes as Ahly's left-back Ali Maaloul was caught napping, allowing a threaded pass to go past him and find Madkour.
Madkour made a marauding run on goal, with his angled shot striking the heel of Yasser Ibrahim after going past keeper Mohamed El-Shennawi to loop goalwards as Ahadad helped it over the line.
Ahly then controlled proceedings, but they were unable to find way past a watertight defence, which was hardly troubled by repeated long balls.
The only first-half chance for Ahly fell to winger Hussein El-Shahat two minutes after Raja's opener.
Raja keeper Anas Zniti pushed away a cross and dived to his left to save a follow-up shot from El-Shahat.
Abdel-Kader and Taher injected zeal in the second half as Ahly mounted an onslaught, although clear-cut chances were still hard to come by.
The closest Ahly came to a goal was a right-foot angled volley from forward Percy Tau that sailed wide with eight minutes remaining.
Taher, who has played a bit-part role recently, then had the last word as Ahly netted a trademark last-gasp goal.
Sherif muscled his way on the left hand side of the area and sent in a low cross that found Magdi Afsha, whose shot was spilled by Zniti into the path of Tau. The South African pulled the ball back to Taher, who picked his spot and rifled home.
Ahly then prevailed on penalties to give Mosimane his fifth title since he took over at the club in October 2020.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)