Pyramids opened the scoring in the 70th minute, only for Ahly to reply three minutes later.
Ahly’s winning goal came in extra time after the teams had battled to a 1-1 draw after 90 minutes.
Pyramids goalkeeper Ahmed Al-Shinnawi, recently called up for international duties, came off his line twice in ill-timed decisions that led to the two goals.
Pyramids could not put the ball in the net despite two dramatic goalmouth scrambles.
It was a record-extending 38th cup title for the storied red-shirted franchise in a tournament founded in 1921.
It was the second cup final loss for the much less established Pyramids who lost to Zamalek in 2019.
On Monday night, in front of 20,000 mostly Ahly fans in Cairo Stadium, the match was evenly balanced for long stretches. Both employed a 4-3-2-1 system that ensured defence would rule over any serious threat at goal. The teams were overly cautious, apparently for fear of allowing the first goal.
The first half was a tepid affair. Ahly striker Mahmoud Kahraba was guilty of a glaring miss from close range. Kahraba had the goal at his mercy after a square pass from defender Ali Maaloul but blasted over the top.
Pyramids duly took the lead in the 70th minute when Ahmed Sami headed an effort which had rebounded off the post.
Ahly made it 1-1 almost immediately, storming back in the 73rd minute when Kahraba pounced on a loose ball that came from a Yasser Ibrahim header.
Minutes later, Pyramids could easily have regained the lead when Ahly’s defence and goalkeeper Mohamed Al-Shinnawi prevented a loose ball from going in on three rapid-fire occasions.
In extra time, in the 104th minute, Ahly scored what would prove the winner when Hamdi Fathi steered a header from Hussein Al-Shahat into an empty net as Al-Shinnawi’s attempt to reach the ball was feeble.
In the 110th minute, Ramadan Sobhi beat Al-Shinnawi from a corner but Al-Shahat blocked the ball with his chest on the line.
Despite the near constant complaining from players from both sides, Egyptian referee Amin Omar performed admirably, overturning his initial decision awarding a handball penalty to Ahly in the first half after reviewing the VAR.
In the days leading up to the match, Pyramid’s owners announced they would stop investing in Egypt after their request for a foreign referee was rejected.
The club had asked the Egyptian Football Association to appoint a foreign-based referee for the final but the governing body opted for an Egyptian.
* A version of this article appears in print in the 13 April, 2023 edition of Al-Ahram Weekly
Short link: