SUBSTITUTE forward Panduleni Nekundi's late strike earned the Brave Warriors a 1-0 win over a ten-man Uganda in Marrakech on Thursday to reach the quarterfinals of the African Nations Championship.
Namibia joined Zambia in the last eight from Group B after the Chipolopolo beat Ivory Coast 2-0 in the day's earlier match.
Like their 1-0 smash and grab over the Elephants four days earlier, the Brave Warriors again left it late, scoring in the dying embers of the match to send Uganda crashing from the tournament and make more history by reaching a knock-out stage of an international Caf competition for the first time.
Uganda and Ivory Coast were eliminated having lost their first two games and will play for pride in their final encounter.
Namibia and Zambia will now battle for group supremacy on Monday to determine who faces host Morocco or Sudan from Group A in the quarter-finals.
Sudan booked their place in the quarters thanks to a 1-0 win over a spirited Mauritania side on Wednesday night, joining Morocco, who had earlier thumped Guinea, on six points from two matches.
"At one point we had decided to take the point but again the players had other plans. My boys showed character in how they stood up against wave after wave of Ugandan attacks," a delighted Brave Warriors head coach Ricardo Mannetti said.
Should Namibia beat Zambia in Casablanca, they play the Group A runners-up in Marrakech but should they fail to usurp their southern-African neighbours, then they play in Casablanca.
"We knew that they were better than us in terms of technique and they were more comfortable on the ball than us. Tonight we were not good at all on the ball but we defended well and we pulled through in the end," said Mannetti.
A despondent Uganda head coach Sebastien Desabre battled to explained his side's continued poor form in front of goal.
"I can't be happy with my boys. We lost a game that in my opinion we should have won because we controlled the entire match," Desabre said.
"The result is a bit deceptive. I think we controlled the game today but we failed to score and in football you need to score goals to win," the Frenchman said during the post match press conference.