Tunisia upset 10-man Nigeria to set up a quarter-final tie against Burkina Faso at the Africa Cup of Nations.
Youssef Msakni beat Super Eagles keeper Maduka Okoye with a long-range effort two minutes into the second half.
Nigeria’s task was made harder when Alex Iwobi was sent off following a video assistant referee review.
The West Africans were the only side to win all three group games in Cameroon, but were largely subdued against a Tunisia side hit by Covid-19.
Nigeria forward Umar Sadiq fired across goal and wide in injury time after Moses Simon had earlier had an effort blocked by Bechir Ben Said.
Tunisia, Nations Cup winners in 2004, will face Burkina Faso in the last eight on Saturday, 29 January.
Depleted Tunisia down Super Eagles
Three-time African champions Nigeria were fancied to go deep in the competition after impressing under interim coach Augustine Eguavoen against Egypt, Sudan and Guinea-Bissau.
Tunisia, meanwhile, had lost twice in the group stage – including to debutants The Gambia – and were without coach Mondher Kebaier and a host of players after positive tests for coronavirus.
Influential captain Wahbi Khazri was only fit enough to take his place among the substitutes but the North Africans had the best chance in the first half in Garoua, as defender Montassar Talbi had an effort cleared off the line.
Nigeria offered little in reply as Wilfred Ndidi sent a bicycle kick wide and Joe Aribo had a shot blocked behind.
Msakni caught out Okoye, who has signed for Watford but is on loan at Sparta Rotterdam, with a low effort from almost 30 yards to break the deadlock soon after the restart.
The shot went past two Nigeria defenders before swerving and bouncing in front of Okoye, who got his outstretched left hand to the ball but could not keep the strike out.
Iwobi was sent on as a 59th-minute substitute but was dismissed just seven minutes later after catching Msakni on the top of the ankle with his studs – even though the Everton midfielder had appeared incredulous when initially shown yellow.
Tunisia midfielder Naim Sliti had a curling effort saved while Nigeria struggled to create chances as the Carthage Eagles sat back and soaked up pressure to complete victory.
Eguavoen is set to be replaced by Jose Peseiro as Super Eagles coach and the Portuguese’s first task will be to navigate a two-legged World Cup 2022 play-off against fierce West African rivals Ghana.