Senegal forward Sadio Mane continued his hit-and-miss tournament when he scored his third goal of the Africa Cup of Nations but also missed a penalty for the second game running as his side beat Uganda 1-0 to reach the quarterfinals on Friday.
Mane broke the deadlock in the 15th minute of a physical game after Senegal pounced on a mistake by Uganda, who were in the knockout stages for the first time in 41 years.
However, he squandered the chance to give Senegal some breathing space when his spot kick was saved by goalkeeper Denis Onyango in the 61st minute of a game which featured 45 fouls.
Outsiders Uganda, whose players were involved in a pay dispute with their federation in the run-up to the game, gave Senegal a stern test at a near-deserted Cairo International stadium.
Senegal will play rank outsiders Benin in the quarterfinals after the Squirrels earlier beat Morocco on penalties following a 1-1 draw in the day's other match.
Mane has now taken three penalties in the finals, missing one and converting one in the 3-0 win over Kenya where he also scored from open play, before missing again on Friday.
Senegal coach Aliou Cisse said, however, that he will remain Senegal's penalty taker.
"As the captain, he has our confidence and he will stay the number one for penalties," Cisse told reporters. "I will have a talk with him about it.
"We had the fortune to get an early goal... it was a very physical game but it's an African match and that is how they are."
Onyango's habit of charging off his line had Ugandan nerves on edge throughout the game.
He first raced out of his area in the fourth minute and felled Ismaila Sarr with a wild lunge, earning a yellow card and leading to a scuffle as Senegal remonstrated.
It was an even game until Godfrey Walusimbi lost possession in the Uganda midfield and Senegal quickly moved the ball to Mane who glided past his marker and planted a left-foot shot past the advancing Onyango.
Unfazed, Uganda had their first real chance after 22nd minutes, a shot on the turn from Emmanuel Okwi which Alfred Gomis did well to turn away.
Shortly afterwards, Onyango made another foray out of his area and was caught as Sarr ran around him but the goalkeeper rescued himself with a last-ditch tackle.
Senegal defender Kalidou Koulibaly had a clear header from a corner but did not make proper contact and the chance was wasted.
After a scrappy start to the second half, Onyango again charged off his line and this time flattened Mane. But Mane's penalty was saved by the keeper who, at that point, was lucky to still be on the field.
Senegal nearly paid the price when Allan Kateregga curled a free kick over the Senegal wall but Gomis made another good save and Uganda's dream run was over.
"We conceded an early goal from an individual mistake which is regrettable," said Uganda coach Sebastien Desabre. "We had some good moves which we could not finish but I am proud of my players."