Tunisia shocked Nigeria and Burkina Faso edged Gabon on Sunday to set up an Africa Cup of Nations last-eight showdown.
Veteran Youssef Msakni scored two minutes into the second half to give previously unimpressive Tunisia a 1-0 second-round triumph over 10-man Nigeria in Garoua.
Nigerian hopes of equalising were dealt a huge blow midway through the second half when Alex Iwobi, initially yellow-carded for a stamp on Msakni, was sent off after the referee looked at the VAR monitor.
In the other last-16 match, Burkina Faso needed a penalty shootout to eliminate Gabon, who forced a 1-1 draw after extra time having played 56 minutes with 10 men following the dismissal of Sidney Obissa.
Substitute Ismahila Ouedraogo scored to give the Stallions a 7-6 shootout victory after Lloyd Palun had struck the woodwork for the gallant Gabonese in Limbe.
"My boys gave their all and I cannot fault them," said caretaker Nigeria coach Augustine Eguavoen, who is now likely to revert to his technical director role with Portuguese Jose Peseiro taking over.
"A slight mistake gave Tunisia their only chance and they scored. We battled to break down their defence. We needed to move the ball quicker and be less predictable.
"I thought the red card was a bit harsh. It was his first offence and not an intentional foul. However, the referee is the boss on the pitch and we must respect his decisions."
In a surprise-riddled tournament, another one arrived just after half-time in Garoua when Qatar-based Msakni put the one-time Cup of Nations champions ahead.
Playing in his seventh Cup of Nations, Msakni dribbled across the edge of the box before unleashing a curling shot that entered the net off the left arm of goalkeeper Maduka Okoye.
In added time, Nigeria had a good chance to level when substitute Umar Sadiq got behind the defence and fired across goalkeeper Bechir Ben Said only to see his shot trickle wide of the far post.
Burkina Faso appeared to have the victory sewn up in normal time thanks to a first-half goal from captain Bertrand Traore, who had earlier missed a penalty.
Gabon were reduced to 10 men when Obissa was dismissed midway through the second half, but they forced extra time as Adama Guira helped the ball into his net in the first minute of added time.
Qualification is a huge boost for Burkina Faso as the West African state deals with a jihadist insurgency.
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ