Egypt put in a spirited display but ended up losing 39-38 to holders Denmark after a dramatic quarter-final game needed penalties to be settled in the World Championship on Wednesday.
The Pharaohs were within touching distance of causing a huge upset after two overtimes in a marathon contest, having led 35-34 with only a few seconds remaining.
However, Ibrahim El-Masri was penalized for a needless foul as the referee sent him off and awarded Denmark a penalty after time had ended, which they converted to force a shootout.
Denmark prevailed in the shootout after Egypt's veteran player Ahmed El-Ahmar and Ali Zein wasted their efforts, erupting in joy after being given a run for their money by their less fancied opponents.
Egypt missed out on emulating their 2001 feat when they reached the semis before eventually finishing fourth in France for their best ever result in the World Championship.
However, they still improved on their eighth-place rank in 2019, finishing seventh to mark their best result in 20 years.
Denmark led 16-13 at halftime but Egypt, just like they did against Slovenia in their decisive main-round game that lifted them to the last eight, staged a comeback to draw 34-34.
They snatched the draw at the death as Denmark could have won it after Egypt were punished for a substitution error, with the European heavyweights given back possession. But youngster Ahmed Hashem intercepted a pass to prevent Denmark from scoring a winner.
There was still room for more excitement in overtime. In the second half of the first overtime, Denmark were seconds away from claiming victory as they enjoyed a 33-32 lead, only for their star Mikkel Hansen to be dismissed for not laying down the ball quickly.
Mohamed Sanad converted the resulting penalty to force another overtime but Egypt's El-Masri eventually committed a similar error to Hansen's and Denmark made the most of it to break the hosts' hearts in Cairo.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)