Mali were knocked out of the Africa Cup of Nations as they drew with Uganda in their final Group D game.
Alain Giresse’s side needed to win to have a chance of making the last eight, but would have been eliminated anyway because of Egypt’s victory over Ghana.
On a waterlogged pitch, they struggled to find a way past Uganda, who were already out following two defeats.
But after Farouk Miya smashed in Uganda’s first Afcon goal since 1978, Yves Bissouma swerved in a free-kick.
Egypt’s 1-0 win over Ghana means they qualify as group winners, with Ghana – who were already assured of a quarter-final place – going through as runners-up.
Ghana play DR Congo in the last eight, while Egypt go on to play Morocco.