(CNN) -- Angola and Algeria both advanced to the quarterfinals of the African Nations Cup thanks to a 0-0 draw in Luanda, with Mali crashing out despite picking up their first win of the competition.
Mali's 3-1 victory over Malawi in the other Group A match meant a point apiece proved enough for Angola and Algeria in a game that started brightly before petering out in the second half.
A dream start for Mali helped them clinch a first pool win in Cabinda, but the result in Luanda meant both they and Malawi missed out on a place in the last eight.
Frederic Kanoute scored after just a minute thanks to a goalkeeping blunder from Swadick Sanudi and Seydou Keita added a second with a thumping free-kick two minutes later.
Russel Mwafulirwa pulled one back for Malawi after 58 minutes, but he then missed a golden chance to make it 2-2 when putting his header wide -- a result which could have put his side through.
Instead, Mamadou Bagayoko added another for Mali with four minutes to play, but the result was of no use to either side.
Angola top the group with five points, one more than Algeria and Mali with Malawi finishing on three points.
Mali beat Malawi 3-1 in the other group game but missed out on qualification after losing 1-0 to Algeria last Thursday.
Angola will now play the top team in Group B, which looks likely to be Ivory Coast, with Algeria set to play Ghana or Burkina Faso.