South Africa recorded their first victory in the 2019 Africa Cup of Nations (Afcon) Group D fixture when they edged out Namibia 1-0 in Cairo on Friday night.
Bafana Bafana were desperate for a victory after losing 1-0 to Ivory Coast's Elephants on Monday afternoon.
Stuart Baxter made four changes to the team which faced the Elephants with Darren Keet, Hlompho Kekana, Bongani Zungu and Sibusiso Vilakazi making their first starts in the tournament.
On the other hand, the Brave Warriors were searching for their first-ever victory at the Afcon finals after succumbing to a 1-0 defeat to Morocco's Atlas Lions on Sunday afternoon.
Baxter's counterpart, Ricardo Mannetti made just one change for the clash against their Southern African rivals, bringing Benson Shilongo into the starting line-up.
Bafana came into the encounter as the favourites, having won their last three matches against the Brave Warriors.
The South Africans pushed for an early goal which would have unsettled the Namibian defence which was led by England-based defender Ryan Nyambe.
Vilakazi combined well with his Mamelodi Sundowns team-mate Themba Zwane, before the former fired over the crossbar from the edge of the box without testing Llyod Kazapua in the Namibia goal.
The Brave Warriors grew in confidence as the match progressed and Deon Hotto had a chance to open the scoring after beating his marker, but the Bidvest Wits winger placed his effort wide of the target.
South Africa upped the tempo with the half-time break approaching and they created two chances following some good movement in Namibia's half.
However, Kazapua, who had a good first half, gathered Zwane's header with ease, before making a decent low save to deny Percy Tau to ensure that the first stanza ended with the two teams locked at 0-0.
Isaskar Gurirab, who won the 2018/19 Namibian Premier League Golden Boot award, was introduced prior to the start of the second half as the Brave Warriors looked to break the deadlock.
Namibia came very close to scoring when Deon Hotto pounced onto a loose ball in the South Africa box and he unleashed a shot which was superbly cleared off the goal-line by Buhle Mkhwanazi.
The 2015 Cosafa Cup winners were left to rue that missed opportunity as Bafana broke the deadlock through Bongani Zungu, who scored from Tau's corner kick to make it 1-0 to South Africa in the 68th minute.
The 1996 Afcon champions continued to attack after taking the lead and Kazapua became a busy man in the Brave Warriors goal-posts as he denied Europe-based attackers Mothiba and Tau in the closing stages of the game.
Namibia attacked in numbers in the dying minutes of the match, but South Africa held on to their slender lead and they secured a hard-fought 1-0 victory.
The victory took Bafana to third place on the Group D standings with one match left, while the Brave Warriors slipped down to fourth place.
South Africa will now face Morocco in their last group match on Monday, while Namibia take on Ivory Coast on the same day.