Cameroon scored a goal in either half to see off South Africa 2-1 in the last 16 of the Africa Cup of Nations finals on Sunday and set up a quarter-final clash with hosts Morocco.
Five-time winners Cameroon proved too strong at the Stade El Barida as they kept on course for Cup of Nations success to make up for their failure to qualify for this year's World Cup in North America.
Goals from Junior Tchamadeu and teenage striker Christian Kofane ensured a significant victory for the Indomitable Lions although they had to fight off a late comeback as South Africa pulled one back through substitute Evidence Makgopa with two minutes to play.
South Africa will be in the Republic of Ireland's World Cup group this summer, alongside co-hosts Mexico and South Korea, if Heimir Hallgrimsson's Boys in Green qualify via the UEFA play-offs in March.
Earlier on Sunday, Morocco booked their berth in the last eight with a 1-0 win over Tanzania, also in Rabat.
Real Madrid winger Brahim Diaz struck in the 64th minute, lashing home at the near post from an acute angle.
It was a far from convincing display but the 1976 champions are one step closer to a second African title.
Tanzania managed just one shot on target with Mohamed Hussein denied by Morocco keeper Yassine Bounou.