Mali's slim hopes of progressing to the last 16 of the Africa Cup of Nations were dashed after a 1-1 draw with Uganda in their final Group D match at Stade d'Oyem.
Alain Giresse's side needed to beat Uganda and hope the already-qualified Ghana would do them a favour against Egypt in the other Group D match at Stade de Port Gentil, if they were to qualify as runners-up.
Yves Bissouma nails free-kick from 30 yards to level scores against Uganda
But, on a sodden, waterlogged Oyem pitch, the Eagles struggled to break down Milutin Sredojevic's well-drilled side.
And their task was made all the harder in the 70th minute, when Standard Leige midfielder Farouk Miya netted with a fine strike from the edge of the area for the Cranes' first goal at the Cup of Nations since 1978.
Lille midfielder Yves Bissouma levelled three minutes later with a thunderous free-kick, but, despite the best efforts of substitute Kalifa Coulibaly, Mali were unable to add a second.
Egypt's 1-0 win over Ghana sees Hector Cuper's side top the group, and the Pharoahs will face Morocco in the quarter-final on Sunday, with Ghana meeting DR Congo in Oyem.
Should the match have even been played ?
Play went ahead at the Stade de Oyem, despite a pre-match downpour that left surface puddles on the pitch which made it look like a Sunday morning on Hackney Marshes. The quarter-finals take place on Sunday, and the other group D game between Egypt and Ghana was happening simultaneously at Stade de Port Gentil, so a postponement was out of the question.
Mali's midfielder Yves Bissouma (L) challenges Uganda's defender Godfrey Walusimbi during the 2017 Africa Cup of Nations group D football match between Uganda and Mali in Oyem on January 25, 2017.
Image credit: AFP
But is does seem harsh on Mali and manager Alain Giresse, who will argue that his side didn't really have the chance to compete for the second spot.
Mali: Sissoko 6, O Coulibaly 6, Wague 6, N'Diaye 6, H Traore 6, .Sylla 6, N'Diaye 6, Bissouma 8 L Coulibaly 6, Marega 7, Doumbia 7. Subs: M Yatabare 7, K Coulibaly 7.
Miya scores belting, and historic goal, for Uganda
On a waterlogged pitch, it is often a case not of how well a team's skilful players play, but how they adapt. The Lille midfielder, who only broke into the first team last year, has a game sense that belies his 20 years. Again and again, he played the ball early into the areas of the pitch where the water wasn't sitting on the surface. And when he did get caught up in water, he cleverly waited for the Ugandans to foul him.
And, when presented with a free-kick chance from 35 yards, he made no mistake, whistling a magnificent strike past the static Robert Odongkara for Mali's 73rd-minute equaliser.
8' – CHANCE! Lassana Coulibaly swings the ball in, and from the second ball from Khalid Aucho's header, Moussa Marega hits his shot into the side netting.
25' – CHANCE! Bissouma checks on the right and tees up Yacouba Sylla, whose curling shot is just over.
Mali's midfielder Yves Bissouma (C) challenges Uganda's midfielder Khalid Aucho and Uganda's defender Godfrey Walusimbi (R) during the 2017 Africa Cup of Nations group D football match between Uganda and Mali in Oyem on January 25, 2017.
Image credit: AFP
57' – CHANCE! Kalifa gets above Ochaya at the back post but his header down is poor and Odongkara saves.
70' – GOAL! Mali 0-1 Uganda. Miya shoots first time from the edge of the box, and nets a screamer, Uganda's first AFCON goal since 1978!
73' – GOAL! Mali 1-1 Uganda. Bissouma nets the equaliser with a brilliant free-kick from maybe 35 yards.
89' -CHANCE! Mustapha Yatabare drops off his defender and gets onto a long ball into the box, but he cannot direct his volley on target.
Mali are without a win in eight group stage matches in the AFCON (D6 L2) and have only managed to record one clean sheet in that time.