Substitute Bazoumana Toure scored in stoppage time for the Ivory Coast, who came from two goals down to beat Gabon 3-2 in Marrakesh on Wednesday and top Group F at the Africa Cup of Nations.
Cameroon also fell behind, against Mozambique in Agadir, but a thunderbolt from Christian Kofane delivered a 2-1 victory.
Defending champions Ivory Coast and Cameroon finished level on seven points, and both had a plus-two goal difference. The Ivorians topped the table after scoring five goals, while Cameroon scored four.