Defending African Nations Championship champions Morocco defeated Uganda 5-2 at the Reunification Stadium in Douala on Tuesday night to qualify for the quarter-finals, while sending the Cranes crashing out of the tournament.
Uganda, who had talked up their chances of progress before the campaign, have now fallen at the first hurdle of the Chan on each of the five occasions they've qualified for the tournament.
Soufiane Rahimi - who scored a brace - Hamza El Moussaoui, Abdelilah Hafidi, and Ayoub El Kaabi were on target for the defending champions, while Ibrahim Orit and Saidi Kyeyune scored for the opponents.
Morocco started the game on a high as they targeted an early goal to ease the pressure. They camped in the Cranes' territory, and in the eighth minute, managed to win a free kick in a promising position.
Omar Nemssaoui took it and tried to bend it into the far corner but goalkeeper Charles Lukwago parried the ball out for an unfruitful corner.
The East Africans were reduced to chasing shadows in the early exchanges as the Atlas Lions dominated the proceedings. In the 13th minute, Johnny McKinstry's charges had the goalkeeper to thank for his heroics.
Later, Rahimi picked out captain El Kaabi, who was making a run in the danger zone. The defenders were beaten and the forward looked certain to score, but Lukwago, somehow, managed to deflect the ball out for a corner.
The Atlas Lions' pace was just too much for the 2019 Cecafa Senior Challenge champions who struggled to settle.
However, against the run of play, the Cranes opened the scoring in the 25th minute. They won a free kick about 30 yards from the Morocco goal. It was taken and the North Africans failed to clear the danger.
The ball eventually fell to Orit, whose shot from 16 yards, beat the helpless Anas Zniti.
The reigning champions continued pushing for an equalizer but they did not find it easy against the determined Cranes, who defended in numbers. In the 37th minute, a strong cross was played in but once again, Lukwago made a timely save.
Two minutes later, Orit was let loose 25 yards from the goal, but his fierce strike was straight at the Atlas Lions custodian.
Morocco won a penalty in the second minute of the added time when Kyeyune handled the ball in the danger zone. El Kaabi held his nerve to send the goalkeeper the wrong way and bring the teams into level terms.
The Atlas Lions needed just five minutes after the break to score their second goal. Adam Ennaffati went past his marker before crossing the ball to the unmarked Rahimi who put the ball into the bottom corner with ease.
In the 60th minute, Orit's fierce striker struck a Moroccan defender's arm in the danger zone. However, the referee pointed to the corner flag, a move that was bitterly contested by Orit who expected a penalty.
Lukwago was once again called to action in the 65th minute. The Atlas Lions captain capitalized on a defensive blunder to steal possession but failed to beat the Cranes keeper ones again.
A school-boy mistake from the Ugandans in the 70th minute allowed El Moussaoui to get possession before maneuvering his way past two players and unleashing a rocket past the goalkeeper.
Rahimi completed his brace with 10 minutes to go to guarantee the defending champions march into the quarters in style.
Cranes halved the score in the 85th minute through Kyeyune, who was teed up by Bright Anukani after the Atlas Lions had conceded a free-kick 20 yards out.
However, the Moroccans were not done, and in stoppage time, Hafidi's effort was deflected into the net by Lukwago to ensure a 5-2 win.
In the group's other game, Rwanda defeated Togo 3-2 to finish second in the group and qualify for the quarters alongside the Lions.
Uganda XI: Charles Lukwago (GK), Aziz Abdu Kayondo, Denis Iguma, Musitafa Mujuzi, Halid Lwaliwa (c), Shafik Kagimu, Bright Anukani, Saidi Kyeyune, Viane Ssekajugo, Ibrahim Orit, Brian Aheebwa.
Morocco XI: Anas Zniti, Omar Nemssaoui, Hamza El Moussaoui, Soufiane Bouftini, Abdelmounaim Boutouil, Reda Jaadi, Mohammed Ali Bemammer, Yahya Jabrane, Adam Ennaffati, Ayoub El Kaabi, Soufiane Rahimi