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