Eleven goals were scored across the last two Women's Africa Cup of Nations Group B matches as Zambia defeated Malawi 2-1 in Rabat only to be eliminated on head-to-head goals scored after Nigeria smashed Egypt 6-2 in the group's other game.
Zambia - quarterfinalists last time out - celebrated at the final whistle after first-half goals from Barbra Banda and Prisca Chilufya took them past Malawi, only to be informed by Confederation of African Football officials that Tabitha Chawinga's second-half consolation goal had dumped them out of the competition.
With Nigeria, Zambia and Malawi all finishing the group-stage campaign on six points, with equal head-to-head records and head-to-head goal difference, the next criteria taken into account - head-to-head goals scored - left Zambia as the odd ones out.
Despite scoring the most goals in the group overall, and conceding the fewest, beginning the day as group leaders and winning their final group game, they only registered two goals in the matches between the three tied sides, compared to four for Malawi and three for Nigeria.
Tournament debutants Malawi will now face either Ghana or Mali in the quarterfinal, while Nigeria can look forward to a showdown with Cameroon in Casablanca on Sunday.
Zambia had raced into a second-minute lead when Banda caught Malawi stopper Mercy Sikelo off guard with a speculative effort. Tearing down the left flank, the 26-year-old took a potshot at goal, but while the Malawi stopper got two hands to it, she was only able to paw the ball up into the air and it promptly fell down behind her, over the goalline in a hideous moment for the keeper.
Malawi suffered another setback in the 25th minute when Sabinah Thom had to be replaced by injury, and Zambia added another in the 37th minute when Chilufya met Maggie Belemu's cross from the right to beat Sikelo at close range.
Zambia looked comfortable, with Malawi largely unable to cope with their intensity and pressing, but as the game grew increasingly ragged, it was Malawi who struck next.
Tabitha Chawinga capitalised on a long ball forward - evaded by the Zambia midfield - and squeezed through the defence, flooring Lushomo Mweemba, before beating Hazel Nali at her near post in the 72nd minute.
The goal changed the complexion of the group, although Zambia didn't immediately change their approach.
Indeed, it was Malawi who had the next big chance to score, as Zambia had Racheal Nachula to thank for diverting substitute Asimenye Simwaka's effort in a goalmouth scramble.
Zambia had a chance of their own late on - seeing a goal-bound effort bouncing back off the crossbar in the 93rd minute - but only learned after the final whistle that their hopes of progression were dashed.
Over in Rabat's Olympic Stadium, reigning champions Nigeria made hard work of Egypt initially, but ultimately romped past them 6-2
Nigeria took a first-half lead when Asisat Oshoala converted a 21st-minute penalty after Nour Abdelwahed handled in the box, but the star striker had to be replaced 20 minutes later with injury.
Her replacement, Gift Monday, added a second six minutes after her entrance, as she finished following fine work from Rinsola Babajide, but Nadeen Ghazy pulled one back from the spot eight minutes later after Michelle Alozie had clumsily brought down Yasmin Abdelaziz.
Another substitute, Uchenna Kanu, added Nigeria's third in the 57th minute, again following fine work by Babajide, and then won a penalty after being fouled by Eman Hassan.
Substitute Christy Ucheibe duly converted the spotkick, but Egypt soon reduced the deficit to two goals when Ghazy added her second with a powerful effort.
Ajibade capped off an outstanding performance with a 91st-minute penalty during a late penalty, with substitute Joy Omewa adding a sixth in the 99th minute.
Nigeria's troubled title defence continues into the knockout stage but their goal flurry against a poor Egypt team should not hide ongoing fragilities.
