Oswin Appollis scored a penalty in the final 10 minutes to hand South Africa a 3-2 victory over Zimbabwe in Marrakech on Monday and seal second spot in Group B at the Africa Cup of Nations, dumping their southern African rivals out of the tournament.South Africa finish with six points in the group, one behind winners Egypt. Both of those advance to the last 16 as Angola (2) finish in third and face an anxious wait to see if that is enough as one of the four best third-placed sides.South Africa led three times in the game thanks to a first international goal from Tshepang Moremi, as well as strikes from Lyle Foster and Appollis, but coach Hugo Broos will be concerned by how open his side were at times at the back.Tawanda Maswanhise scored an excellent first equaliser for Zimbabwe and they also profited from an Aubrey Modiba own goal as they missed several other chances and should have earned at least a draw.South Africa, who finished third in the Ivory Coast two years ago and have qualified for the 2026 World Cup, have yet to hit top gear in the tournament, and were cut apart far too easily by Zimbabwe at times.South Africa led after seven minutes as Moremi’s shot took a wicked deflection off Divine Lunga and looped into the net.Zimbabwe hit back in the 19th minute with a goal that will go down as one of the best of the tournament as Maswanhise picked up the ball 35 yards out and danced past two defenders before drilling a low shot past goalkeeper Ronwen Williams.Poor defendingBut South Africa were back in front five minutes after the break when Lunga’s back header to keeper Washington Arubi allowed Foster to sneak in ahead and nod the ball into the net.Zimbabwe equalised again in the 73rd minute as Maswanhise’s low shot was saved by Williams, but the ball deflected onto Modiba and into the net for an own goal.South Africa were awarded a penalty with 10 minutes remaining when midfielder Marvelous Nakamba made a goalkeeper-style diving save and handled a shot that appeared to be going wide.Appollis converted from the spot and Zimbabwe’s hopes of qualifying for the knockout stages at the sixth attempt were dashed.