Ivory Coast’s hopes of reaching a fourth straight World Cup took a knock when beaten 2-1 at home by Gabon.
The slip-up meant Morocco would have topped Group C with a win in Mali but they missed a penalty in a 0-0 draw.
In Bouake, Axel Meye fired home before Southampton’s Mario Lemina curled home a beauty after 29 minutes.
Gabon’s Lloyd Palun was sent off in first-half stoppage time but the Ivorians could not draw level despite Maxwell Cornet’s volley near the hour.
Ivory Coast stay on seven points from four games, while Morocco move up to six points following their draw.
The Bamako encounter was hugely entertaining despite its goalless status, with Mali goalkeeper Djigui Diarra superbly keeping out Hakim Ziyech’s 72nd-minute penalty.
Shortly after, Morocco substitute Oussama Tannane spurned another chance when missing the target with only Diarra to beat.
Morocco will rue the chances after failing to beat a side they hammered 6-0 in Rabat on Friday.