South Africa and Madagascar advanced to the semi-finals of the Cosafa Under-20 Championship after both nations claimed victories in their final Group B matches in Lusaka, Zambia, on Tuesday.
South Africa top the pool with seven points, ahead of Madagascar on goal-difference only, with the latter advancing to the knockout stages as the best runner-up from the three pools.
And the teams will meet again in the first of the semi-finals on Thursday, with Zambia and Angola to contest the other semi.
South Africa defeated Lesotho 4-0 to seal top spot in the pool, another solid performance from the side.
They were ahead on 20 minutes when Sinenjongo Mkiva netted his third goal of the tournament before Rahim Milazi added a second just two minutes later.
Captain Lancaster Human blasted the ball into the net from an extremely tight angle to make the points safe, and they added a fourth just after halftime through Keletso Sifama.
Madagascar were made to sweat by Mauritius in their final Group B encounter, despite taking a 2-0 halftime lead.
Randianantenaina Arnaud and Aristide Ranaivo Harison set them on their way to what looked a certain victory, but Mauritius pulled a goal back with 20 minutes remaining to set up a nervous finish.
But Madagascar were able to hold on and are now one step away from another final after claiming a surprise victory in this tournament in 2005.
The semifinals see South Africa clash with Madagascar just four days after they met in the pool stages and played to a 1-1 draw.
The other semifinal between Zambia and Angola pits two sides together who had 100 per cent records in the pool stages, winning all three of their group games.
Angola looked imperious as they topped Group C, scoring 13 goals and conceding only one, while Zambia were equally impressive in Group A.
The Zambians are hoping to lift the title for the first time since 2016, while Angola can reach their first final since 2011. The Young Palancas Negras have been to four previous deciders in this age-group but never lifted the trophy.
In partnership with ANA and Sports Leo