Two goals in five minutes at the start of extra-time helped defending champions Egypt book their place in the African Nations Cup semi-final with a battling victory over Cameroon.
The game, though, was marred by a controversial third goal by Pharaohs' captain Ahmed Hassan which was allowed to stand by referee Jerome Damon despite replays showing the ball had clearly not crossed the line
By that time the Egypt midifelder, who was winning a record 170th cap for his country, had already nodded Achille Emana's corner past his own keeper in the 26th minute, though the Indomitable Lions player was awarded the goal.
Hassan scored again at the other end to pull his side level with a powerful long-range strike before half-time which eventually forced the game into an additional 30 minutes in Benguela.
Substitute Mohamed Gedo then capitalised on an error from Geremi Njitap to put Egypt ahead in extra-time, before Hassan's controversial strike handed them a two-goal cushion.
To make matters worse for Paul Le Guen's Cameroon, Aurelien Chedjou was sent off late on as the north Africans set up a tantalising last-four clash with old foes Algeria.
There seemed to be some extra bite from the Cameroonians at the start as they looked determined to end the Egyptian stronghold over them that had been so evident in recent meetings.
But there were no real chances to speak off, apart from a flurry of early Achille Emana corners that were all comfortably dealt with, while the Pharaohs' best chance came when a floated Mohamed Zidan free-kick was headed over by a diving Ahmed Al-Muhammadi.
The deadlock was finally broken when the seventh corner from Emana on the left was too strong for Hassan's weak-header on the line and he nodded into his own net at the near post as the defending champions fell behind.
The Indomitable Lions continued to crank up the pressure, but were taken by surprise when Hassan unleashed a fierce 35-yard strike that was poorly dealt with by a scampering Carlos Kameni and kicked off the turf before flying in.
That goal came in the 37th minute and moments later Hassan was again in the mix when his right-sided cross was wastefully headed wide by Hosni Abd Rabou.
Emana then saw his low strike from outside the penalty area kept out by a scampering Essam El-Hadary with both sides going in level at the break.
Egypt almost took the lead straight from the restart when a long ball from their goalkeeper was left to bounce by Chedjou and Emad Moteab's attempted flicked finish was cut out by Kameni.
Zidan was then twice in good positions, but missed out - first he was put through by Sayed Moawad only to be let down by a wayward final strike, and thereafter stealing the ball off Chedjou inside the penalty area before an acrobatic stop from the Cameroonian custodian helped keep his side level.
Emana tried to respond for his side with a powerful 20-yard strike straight at El-Hadary, before the anonymous Samuel Eto'o finally got a shot in on goal in the 78th minute which was comfortably dealt with by the Egypt goalkeeper.
Moteab could have won the game right at the death after he was picked out at the back post by a sweeping pass from Hassan, but the Al-Ahly forward could only find the side netting as the game entered extra-time.
Hassan Shehata's men then wasted no time in killing off the tie going 3-1 up after 95 minutes. They were gifted both goals - the first when Geremi's poor back-pass from the right was intercepted by Gedo and tucked away with ease through the legs of Kameni two minutes after the resumption.
The second seems certain to land South African referee Damon in the spotlight after Hassan's free-kick from the left was pushed onto the underside of the crossbar by the Espanyol goalkeeper and did not cross the line when it hit the ground, but was still allowed to stand much to the dismay of the Cameroon players.
It also seemed to knock the stuffing out of Le Guen's men as they failed to create any major openings in the closing 25 minutes.
To make matters worse, Chedjou was shown straight red for hauling down last-man Gedo midway through the second period of extra-time with Egypt going on to seal a memorable win.