Goalkeeper Lionel Mpasi scored the 18th penalty of a nerve-shredding shoot-out as DR Congo produced the latest shock at the 2023 Africa Cup of Nations by knocking seven-time champions Egypt out to reach the quarter-finals following a 1-1 draw after extra time.
DR Congo went ahead for the first time at the finals when Meschack Elia nodded in Yoane Wissa's cross to put the team ranked 67th in the world on course for the latest surprise result at a tournament which has been illuminated by underdog success in Ivory Coast.
Their lead lasted nine minutes before Mostafa Mohamed converted a penalty on the stroke of half-time after Ahmed Hegazi was caught by a flailing arm from Dylan Batubinsika.
Egypt finished with 10 men after left-back Mohamed Hamdy was shown a second yellow card seven minutes into extra time for a mistimed lunge on Simon Banza.
And, after Pharaohs keeper Gabaski had clipped the top of the crossbar in the ninth round of the shoot-out, Mpasi stepped up to win it 8-7 on penalties.
In the absence of injured captain Mohamed Salah, Rui Vitoria's team ended the tournament winless and suffered the same fate as they did in the 2021 final, when they were beaten on penalties by Senegal.
An unmarked Hegazi headed an early first-half chance over from seven yards out and substitute Mahmoud Hamada lost his footing from a presentable opportunity late in normal time, but the Leopards were worthy winners and could have gone ahead sooner had the lively Elia not lashed an effort over in the third minute.
The shoot-out saw both sides miss from their second attempts, with Mohamed side-footing wide of the right-hand upright and Arthur Masuaku immediately scooping the ball over the crossbar for the Central Africans.
But Mpasi kept his composure to slot into the top right-hand corner against Gabaski, who had been a penalty-saving specialist in Egypt's run to the final in Cameroon two years ago.
DR Congo will play Guinea in the quarter-finals at Abidjan's Alassane Ouattara Stadium on Friday (20:00 GMT) after the Syli National beat Equatorial Guinea 1-0 earlier on Sunday.
Egypt exit Afcon on penalties again
If a knockout-stage meeting between two sides who had drawn all three of their group games is a rarity, it was less of a surprise when the contest ended all square after 90 minutes.
The move which broke the deadlock eight minutes before the break started with a piece of quick thinking by Masuaku, releasing Wissa on the left with a throw-in which allowed the Brentford attacker to enter the penalty area and clip a cross via a deflection into the path of Elia to head in on the line.
Egypt were missing one of the early stars of the finals, Emam Ashour, because of concussion, while goalkeeper Mohamed El Shenawy, who suffered a dislocated shoulder during their final group-stage game, was replaced by Gabaski.
The North Africans may have been lacking the talismanic Salah in attack, but Mohamed initially proved his reliability again from the spot to equalise with his fourth goal of the finals.
Hegazi had gone down in a heap following Batubinsika's aerial challenge, leading South African referee Abongile Tom to book the crestfallen centre-back for a stray arm following a VAR review and check on his pitch-side monitor.
Chances were few and far between in the second half, but Cedric Bakambu arrived ahead of Hegazi to meet Elia's inviting cross after the winger escaped down the right but stabbed his first-time finish just wide at the near post.
Chancel Mbemba headed Masuaku's cross over the target, and the Leopards needed Mpasi to react smartly when Hamdi Fathi's clever flick allowed Zizo to accurately fire in a fierce shot from a tight angle.
But Hamada had the goal to aim at when Zizo located him at the far post shortly after his late introduction, only to lose his feet as the cross dribbled behind him in a let-off for DR Congo.
With penalties looming, Egypt had more defending to do once Hamdy had been dismissed for a foul which left Banza clutching an ankle in pain.
Hamdy became the first Egyptian player to receive a red card at the Africa Cup of Nations since Medhat Abdel Hadi in 1998 against Morocco.
West Brom midfielder Grady Diangana narrowly failed to connect as the ball bounced tantalisingly across Egypt's six-yard box, prefacing a finale in which the more established contenders seemed understandably content to play for time rather than attack with intent.
Mpasi appeared to be studying instructive photos of Egypt's potential penalty attempts as the teams gathered before the final act, but Gabaski might have reminded himself of the four spot kicks across three shoot-outs he kept out at the 2021 finals, as well as Sadio Mane's first-half effort in the final.
As it was, the player of the match on that occasion could only rattle the crossbar when he was called upon to take one himself this time, the consequence of a string of finishes which gave neither goalkeeper many chances to become a hero.