Zimbabwe goalkeeper George Chigova saved three penalties in the post-match shoot-out as the Warriors booked a semi-final place in the 2018 COSAFA Cup with a 4-1 victory that followed a tense 1-1 draw in the 90 minutes.
Hosts South Africa were on the wrong end of a shoot-out result though as they were ousted from the competition by Madagascar, who triumphed 4-3 on penalties after their match finished 0-0.
It means the semi-final line-up is complete, with defending champions Zimbabwe to take on Lesotho, while Zambia will clash with Madagascar. Both of those matches will be played at the New Peter Mokaba Stadium on Wednesday.
Zimbabwe exerted all the early pressure and took the lead on 39 minutes when the mercurial Khama Billiat played Evans Rusike in on goal and the forward smashed the ball into the top corner of the net.
But Botswana kept plugging away and equalized on the hour-mark as Onkabetse Makgantai moved to the top of the competition's scorers' charts with his fourth goal of the 2018 COSAFA Cup.
This time he guided a header into the far post and the ball just trickled out of Zimbabwe goalkeeper George Chigova's reach. And the Zebras had a superb chance to take a shock lead when substitute Tumisang Orebonye received the ball 12 yards out, but with the Chigova out of position and the goal at his mercy, he put his shot over the bar.
The match went to a shoot-out and Chigova, playing on his home ground with club side Polokwane City, proved the hero for the Warriors.
South Africa dominated the chances in their game and should have been at least a couple of goals up by halftime, but were dragged into penalties by a Malagasy side that was organised and structured in their play.
Luther Singh took South Africa's fifth penalty in the shoot-out, but his tame effort was easily saved by Madagascan goalkeeper Jean Dieu Randrianasolo and Tobisoa Sandratriniain stepped up to put the islanders into the semi-finals.
The home side created an early opportunity when Singh played a clever free-kick low into the path of Lebogang Maboe, but the midfielder's first-time shot went just wide of goal.
The home side had an even better opportunity on 20 minutes when Ryan Moon's delightful ball over the top of the Madagascar defence set Singh free one-on-one with Randrianasolo, but he disappointingly shot straight at the gloveman.
It took 33 minutes for Madagascar to have their first effort on target, but Jaotombo Bourahim shot over from the edge of the box. Maboe had another fantastic chance to score when beat the offside trap and found himself with only Randrianasolo to beat, but like Singh before him, shot straight at the keeper and it would end goalless at the break.
South Africa almost found the opener when Aubrey Modiba's shot from the edge of the box had the beating of Randrianasolo, but not the crossbar and Mosiatlhaga was unable to get the rebound on target.
Monday will be a rest day in the competition, but South Africa will be back in action against Namibia in their Plate semi-final at the Old Peter Mokaba Stadium on Tuesday. That match kicks-off at 17h00 (15h00 GMT).
Botswana will clash with Swaziland in the other Plate semi-final that will kick-off at 19h30 (17h30 GMT)
South Africa 0 Madagascar 0 - Madagascar win 4-3 on penalties
Zimbabwe 1 (Evans Rusike 39') Botswana 1 (Onkabetse Makgantai 60') - Zimbabwe won 4-1 on penalties
Namibia vs South Africa (KO 17h00 local, 15h00 GMT) - Old Peter Mokaba Stadium
Swaziland vs Botswana (KO 19h30 local, 1&h30 GMT) - Old Peter Mokaba Stadium