Tunisia moved top of Group D after a brace from Francileudo dos Santos capped an impressive display in Tamale.
Chaouki Ben Saada scored Tunisia's second against South Africa
Dos Santos struck with a diving header early on and then hit the post after 31 minutes, with Chaouki Ben Saada converting the rebound from 10 yards.
Two minutes later Dos Santos scored his second, pouncing on a poor back pass by South Africa's Nasief Morris.
Steven Pienaar's mazy dribble played in Katlegi Mphela for Bafana Bafana's consolation in the dying minutes.
The result means the north Africans top the group on goals scored and a draw in their match against Angola on Thursday would be enough to see both sides progress to the quarter-finals.
Tunisia were the vastly superior team against Bafana Bafana and effectively had the game won by half-time.
After Dos Santos converted Ben Saada's cross with just eight minutes gone, South Africa tried to force their way back into the contest but their best chances had been confined to set-pieces.
Bafana Bafana's defence was crumbling and Ben Saada pounced for the second before a sloppy back pass from Morris allowed an alert Dos Santos to steal in, round Josephs and coolly slot home for his second and Tunisia's third.
Morris nearly atoned for his mistake soon after when he sent his header from Teko Modise's free-kick bouncing on to the Tunisia crossbar.
In the second half, South Africa struggled to make the early impact that coach Carlos Alberto Parreira surely wanted, with both Modise and Zuma shooting desperately from distance, while Thembinkosi "Terror" Fanteni hit the side netting.
Bafana Bafana played a series of high balls into the area where the likes of Zuma and substitute Katlego Mphela were out-jumped and out-muscled by the Tunisian rearguard.
Dos Santos squandered a gilt-edged chance to complete his hat-trick when he missed an open goal from point-blank range, after Yassine Chikaoui had forced his way into the area and played in his team-mate.
The 21-year-old Chikhaoui, who plays for Swiss side FC Zurich, was a shining light for Tunisia and tormented three South African defenders at one point with flair and trickery.
Everton's Pienaar came close to scoring South Africa's opener when he flashed a shot wide from the edge of the area.
Pienaar was involved again minutes later, when his corner found substitute Elrio van Heerden free in the area, only for the midfielder to shoot over from close range.
But in the dying minutes Pienaar's late show earned his team what could be a crucial goal when he swivelled past three defenders and played in substitute Mphela, who struck home from five yards.
Tunisia: Kasraoui, Haggui, Mikari, Ben Fredj, Jaidi, Ben Saada, Nafti, Mnari (Zouaghi 75), Traoui, Chikhaoui (Jemaa 80), Santos (Ben Dhifallah 66).
Subs Not Used: Mathlouthi, Nefzi, Ghezal, El Bekri, Felhi, Meriah, Abdi, Zaiem.
Booked: Ben Fredj.
Goals: Santos 8, Ben Saada 32, Santos 34.
South Africa: Josephs, Masilela (Evans 62), Mokoena, Morris, Mhlongo, Moon, Modise, Pienaar, Chabangu (Van Heerden 46), Zuma, Fanteni (Mphela 60).
Subs Not Used: Fernandez, Khune, Fransman, Nhlapo, Dikgacoi, Tshabalala, Davids, Moriri, Walaza.
Goals: Mphela 87.