Burkina Faso edged past 10-man Gabon to advance to the Africa Cup of Nations quarter-finals with a 7-6 victory on penalties after a 1-1 draw in their round-of-16 tie in Limbe.
Ismahila Ouedraogo netted the decisive kick to ensure they became the first side into the last eight after an incident-packed and energy-sapping clash.
After Burkina Faso skipper Bertrand Traore scored early, 10-man Gabon took the match into extra-time following a dramatic last-minute equaliser.
But in the end the Burkinabe held their nerve in a dramatic shootout to advance. They will take on either Nigeria or Tunisia, who meet later on Sunday.
The first goal came after Traore ran onto a defence-splitting pass from teenager Dango Ouattara to hit home with a left-footed effort from outside the penalty area in the 28th minute, as he beat the Gabon defence and the on-rushing goalkeeper, with his effort sneaking in off the post.
It made up for a penalty Traore squandered some 11 minutes earlier when he crashed his effort against the crossbar – the ninth failed penalty attempt at the tournament in Cameroon.
The penalty was conceded by Gabon centre-back Sidney Obissa, who picked up a second caution in the 67th minute for holding back an attacker and was sent off, leaving Gabon to complete almost half of the extended match down to 10.
Traore was continually threatening on the counter-attack and Ouattara also had chances on the break as Gabon were caught often as they tried to sweep forward in searching of an equaliser.
Gabonese striker Boupendza had the ball in the net four minutes before half-time but was marginally offside.
Gabon goalkeeper Jean-Noel Amonome also blocked close-in effort from Blati Toure and Adama Guira in an action-filled final 10 minutes.
Gabonese captain Bruno Ecuele Manga struck with a late equaliser, timing his run perfectly into the penalty area to power his header home and rescue his side from imminent defeat.
The match went to spot-kicks and it needed 18 penalties to settle the shootout with both sides squandering chances to win it before substitute Ouedraogo netted the winner.
AFCON 2021 round-of-16 fixtures and results
Sunday January 23
Game 1: Burkina Faso vs Gabon, 4pm (Limbe Stadium, Limbe) – Live on Sky Sports Football
Game 2: Nigeria vs Group B/E/F third-place, 7pm (Roumde Adjia Stadium, Garoua) – Live on Sky Sports Mix
Monday January 24
Game 3: Guinea vs Group F runner-up, 4pm (Kouekong Stadium, Bafoussam) – Live on Sky Sports Football
Game 4: Cameroon vs Group C/D/E third-place, 7pm (Olembe Stadium, Yaounde) – Live on Sky Sports Premier League
Tuesday January 25
Game 5: Senegal vs Cape Verde, 4pm (Kouekong Stadium, Bafoussam) – Live on Sky Sports Football
Game 6: Morocco vs Malawi, 7pm (Stade Ahmadou Ahidjo, Yaounde) – Live on Sky Sports Football
Wednesday January 26
Game 7: Ivory Coast vs Egypt, 4pm (Japoma Stadium, Douala) – Live on Sky Sports Football
Game 8: Group F winner vs Equatorial Guinea, 7pm (Limbe Stadium, Limbe) – Live on Sky Sports Premier League
The Africa Cup of Nations tournament will be broadcast live on Sky Sports in January and February.
The tournament, originally scheduled to be played in June and July 2021, will be played in Cameroon between January 9 and February 6, 2022, with Sky Sports showing all 52 games live.
Twenty-four teams will take part, kicking off on January 9 as hosts Cameroon host Burkina Faso in Yaounde, before culminating in the final on February 6 in the capital.