Sadio Mane suffered a sickening blow to the head only to score just moments later as Senegal booked their place in the Africa Cup of Nations quarter-finals.
The Lions of Teranga, among the tournament favourites, saw off Cape Verde after the minnows had seen two men sent off in Cameroon.
And they had Liverpool star Mane to thank for breaking down the stubborn resistance of Cape Verde, after his superb 63rd minute strike opened the scoring.
But Liverpool will be questioning why Mane was still on the pitch to net his winner, following the incident which saw Blue Sharks' 'keeper Vozinha sent off.
Mane, 29, had been his side's brightest spark at the Stade Kouekong from the outset, striking a post inside the opening two minutes.
Aliou Cisse's men dominated the first period and their hopes of progress were helped midway through the half, when Patrick Andrade's yellow card for a lunge on Pape Gueye was upgraded to a straight red after an intervention from VAR.
However, Senegal struggled to create high quality chances against the 10 men, and failed to make a breakthrough before the half-time whistle.
It was a similar story early in the second half, until the 54th minute, when the clash between Mane and Vozinha saw the latter dismissed.
Chelsea goalkeeper Edouard Mendy claimed a long ball inside his box, before looking long and launching his kick beyond the Cape Verde defence.
Mane was typically razor sharp and ran clean through to meet the delivery, with Vozinha rushing out of his area to do likewise; both men jumped with Mane making the ball fractionally ahead, leading to a thudding collision of heads.
Both hit the deck, with Mane appearing to be knocked out, and medics from both sides immediately rushed on. As both received medical attention, VAR intervened to rule that Vozinha should be sent off, putting Cape Verde down to nine men.
Pape Gueye's resulting free kick went over the bar, at which point Mane was allowed to re-enter the game.
Minutes later Senegal found the breakthrough, when a right-wing corner fell kindly to Mane on the far corner of the penalty area; his immaculate first touch was followed by a magnificent, arcing second, which clipped the underside of the crossbar and beat substitute stopper Marcio Rosa.
Senegal celebrated as VAR checked for a potential foul. When the decision was made to allow the goal to stand, Mane hit the deck. Teammates and medical staff rushed around the Kop star, with the decision then made to end his evening, Bamba Dieng replacing him as Mane walked off under his own esteem.
Senegal had late chances against the nine men to double their advantage and Dieng coolly slid home his first international goal in injury time to seal their spot in the last eight.
Whether Mane will be OK to feature however will be in question, while Liverpool's medical staff, watching from afar, will no doubt be demanding to know why he wasn't immediately replaced.