Guinea reached the last 16 at the Africa Cup of Nations despite losing their final Group B match 2-1 against already-eliminated Zimbabwe.
Knowledge Musona’s downward header and Kudakwashe Mahachi’s low strike put the Warriors two up at half-time.
Guinea captain Naby Keita replied with a stunning goal in Yaounde, in a match which saw referee Salima Mukansanga make history.
The Rwandan, 35, became the first woman to referee a Nations Cup game.
Guinea finish second in the group table, ahead of Malawi on head-to-head record after the Flames drew 0-0 with Senegal.
The West Africans will now face the runners-up from Group F on Monday, 24 January but will be without Liverpool midfielder Keita, who will be suspended after picking up his second booking at the tournament.
Warriors end 16-year wait for win
The opening goal came in the 26th minute when Guinea could only half-clear a corner that Never Tigere curled invitingly back into the danger zone for the unmarked Musona to glance home.
Mukansanga’s first real involvement came when she brandished her first yellow card, booking Ibrahima Cisse for a raised elbow.
Zimbabwe were able to take advantage of their lethargic opponents two minutes before the break when Syli Nationale failed to react to a quickly taken free-kick, the move eventually resulting in a low drive from Mahachi that should have been saved but instead squirmed under the body of Aly Keita.