Sadio Mane scored the winner before missing another penalty as Senegal beat Uganda in Cairo to reach the Africa Cup of Nations quarter-finals.
Liverpool’s Mane produced a clinical low finish then won a penalty after being fouled by keeper Denis Onyango, who had already been booked.
Mane, who had missed from the spot in the previous game against Kenya, was denied after the referee opted against sending the keeper off.
Allan Kateregga went close for Uganda.
Senegal, who are seeking a first Africa Cup of Nations triumph, will meet Benin, surprise winners over Morocco, in the last eight in Cairo on 10 July.
Despite his penalty miss, Mane is leading scorer at the tournament after scoring his third goal, two of which have come from the spot.
Uganda’s build-up to the tie was disrupted by a pay dispute which saw players boycott training on Tuesday.
Emmanuel Okwi and substitute Kateregga, from a late free-kick, both forced saves from Alfred Gomis but Senegal’s experience saw them through.
BBC Afrique’s Pierre-Antoine Denis
Sadio Mane’s goal in the opening minutes of the game concluded a very good start for Senegal. We saw more evidence of the speed and dynamism of their attacking, and it could be the key factor in leading them to the title.
There was also an excellent performance by Idrissa Gueye – the Everton player controlled the midfield on his own, dictating the pace of his team.
Uganda made too many mistakes, showing too little of the technical ability they possess. In addition, they have made far too many defensive errors for this level of competition, one leading to a goal and the other to Mane’s failed penalty.
They are out, but they have made their nation proud, producing some impressive performances and revealing some very talented players.