Madagascar produced the shock of the Africa Cup of Nations so far as they beat three-time winners Nigeria 2-0.
The Indian Ocean islanders have been the surprise package on their Afcon debut, claiming four points from their first two games in Egypt.
And Lalaina Nomenjanahary stunned Nigeria by pouncing on a defensive error to claim an early opener.
Carolus Andriamatsinoro’s deflected free-kick then ensured Madagascar went into the last 16 as winners of Group B.
Madagascar are ranked 108th in the world – 63 places below Nigeria, who go through as runners-up having won their first two group games.
Nigeria dominated possession but were punished when trying to play out from the back. John Ogu under-hit a square ball to Leon Balogun on the edge of their own box and the Brighton defender hesitated, allowing Nomenjanahary to nip in and round the goalkeeper before slipping the ball into an empty net.
Coach Gernot Rohr made five changes to the Nigeria side that beat Guinea 1-0 but they still featured several players who are regulars in Europe’s top leagues and the Super Eagles replied with Samuel Kalu curling a shot wide.
But Madagascar continued to make the better chances as Andriamatsinoro produced a tame volley after exchanging passes with Jerome Mombris, before captain Faneva Andriatsima lashed a shot wide after being slipped in by Andriamatsinoro.
Madagascar doubled their lead as Andriamatsinoro’s 25-yard free-kick deflected in off half-time Nigeria substitute Wilfred Ndidi. The Leicester midfielder then produced his side’s first shot on target on 57 minutes but not even the introduction of Arsenal forward Alex Iwobi could spark a Nigeria fightback.