It was a tight game, with the Urban Warriors needing George Maluleka’s extra-time goal to see them through.
Ajax enjoyed the better of the early exchanges, but with Terror Fanteni missing from the starting XI, they failed for the most part to find any form of potency in front of goal.
There was an 11th-minute chance for Lebogang Manyama, but his effort was deflected wide of the target.
Stars had more than their fair share of possession as the game progressed, but failed to test keeper Sander Westerveld.
Maluleka was unlucky not to put the Cape side ahead after 25 minutes when he curled a delightful free-kick onto the crossbar.
And only a minute later the woodwork again worked to the advantage of the visiting team when goalkeeper Kennedy Mweene did superbly to tip Khama Billiat’s goalbound shot against the crossbar.
Three minutes after the break Alcardo van Graan was not too far off as he attempted an audacious lob-come-chip from some way out.
Stars, however, should have taken the lead on the 50-minute mark, but Daniel Agbagwu shot straight at Westerveld, who nonetheless made an excellent block.
As the second half unfolded, chances were few and far between, instead the game deteriorated into a string of fouls and yellow cards, as well as stoppages for injuries, several of them head clashes.
Stars had the first chance of extra-time when Edward Manqele watched as his 20-yard effort swung just wide of goal with Westerveld rooted to the spot.
But it was Ajax who got the breakthrough when, five minutes into extra-time, Fanteni neatly threaded in Maluleka on goal, with the latter making no mistake with a low finish from 12-yards out.
Maluleka should have scored a second goal a minute later, again getting played in on goal by Fanteni, but this time his side-footed shot past an advancing Mweene rolled just wide.
Billiat also wasted the chance to add a second when he side-footed tamely at Mweene with seven minutes to go, but it was not to prove costly as Ajax held on for the victory.