Wilfried Zaha scored the only goal as the Ivory Coast beat Mali to reach the Africa Cup of Nations quarter-finals.
The Crystal Palace forward, who has been at the centre of transfer speculation, struck in the second half to set up a clash with much-fancied Algeria.
Mali dominated the first half but had nothing to show for their nine attempts on goal, with Sylvain Gbohouo saving two Moussa Marega free-kicks and one from Abdoulaye Diaby.
But after Moussa Djenepo stumbled in front of goal after latching on to Marega’s superb through-ball, the momentum swung completely.
Jonathan Kodjia hooked an effort wide from an Ivory Coast corner, with Franck Kessie just unable to divert it goalwards.
The Aston Villa striker then ran on to a long ball over the defence but despite goalkeeper Djigui Diarra slipping, Kodjia allowed him to recover and make the save.
Gbohouo had an erratic day in goal but claimed the assist for the Elephants’ 76th-minute winner. His long free-kick was missed by Kodjia, deceiving the Mali defence, and Zaha finished calmly under pressure from Diarra.