Achraf Hakimi missed a vital late penalty as much-fancied Morocco became the latest heavyweight casualty of the Africa Cup of Nations on Tuesday, suffering a shock 2-0 defeat to South Africa in the last 16.
Evidence Makgopa gave South Africa the lead just before the hour mark in Cote d'Ivoire's coastal city of San-Pedro, but Morocco had the chance to draw level five minutes from time from the penalty spot.
Paris Saint-Germain star Hakimi squandered the opportunity, sending his kick off the top of the bar and over, before Morocco's misery was compounded as Sofyan Amrabat was sent off in stoppage time, followed by a second South African goal, as Teboho Mokoena scored from the resulting freekick.
Bafana Bafana go through to a quarterfinal on Saturday in Yamoussoukro against tiny Cape Verde, who have been one of the surprise packages of the tournament so far.
"We came here with the first aim to get out of our group," said South Africa's Belgian coach Hugo Broos.
"We were delighted to do that, but you can't be certain of going any further when you come up against Morocco.
"On Saturday we will once again be playing against a dangerous team and we can't make the mistake of underestimating them," he added of Cape Verde.
Meanwhile, Morocco, World Cup semifinalist in 2022, adds to an ever-growing list of the continent's big names crashing out of this Cup of Nations. Twenty-four hours earlier, champions Senegal was eliminated on penalties by host Cote d'Ivoire.
Africa's top-ranked side was hoping to follow up its remarkable run to the last four in Qatar just over a year ago by winning its second AFCON title, 48 years after its first.
Instead, Morocco goes the same way as Senegal, Tunisia, Algeria and Egypt, meaning none of the five top-ranked African nations will be present in the quarterfinals, as well as none of the semifinalists from the last edition.
"We are very disappointed because we came here with the ambition of winning," admitted Morocco coach Walid Regragui.
"Going out so early was not in our plans, but this competition is very difficult.
"I take responsibility for everything that has happened. I never hide. Today I have failed," he added.
Glorious chance
A South Africa side featuring eight players from the country's leading club, Mamelodi Sundowns, in its starting line-up took the lead in the 57th minute.
Themba Zwane released Orlando Pirates striker Makgopa, who put the ball past Morocco goalkeeper Yassine Bounou.
Yet, a Morocco team missing the injured Hakim Ziyech and Sofiane Boufal were given a glorious chance to equalize late on.
They appealed loudly for a penalty when an Ayoub El Kaabi shot from point-blank range smashed into the arm of South African defender Mothobi Mvala.
The Sudanese referee initially waved play on, before awarding the penalty after being called across to review the incident.
Up stepped Hakimi, the runner-up to Nigeria's Victor Osimhen for the most recent African footballer of the year prize, but he failed to convert from the spot, a mistake that would condemn his side to elimination.