(CNN) -- South Africa got its Africa Cup of Nations campaign back on track with its first victory in the competition since 2004.
The host nation defeated Angola 2-0 in Durban to leave it within touching distance of the quarterfinals following the disappointment of the opening day draw with minnow Cape Verde.
On this occasion, Bafana Bafana was far more impressive and goals from defender Siyabonga Sangweni and substitute striker Lehlohonolo Majoro secured the points.
South Africa face Morocco on Sunday with only a draw needed to take it through to the next stage.
"I gambled today because it was a must-win situation," coach Gordon Igesund told reporters following the win against Angola.
"We had four defenders, one holding midfielder and the other five players were committed to attacking.
"The players believed in themselves -- the nerves that affected us so much against Cape Verde were gone. It was not easy out there on the pitch with the weather so hot."
Morocco will need to defeat South Africa to guarantee its place in the last-eight after it came from behind to secure a 1-1 draw against Cape Verde.
Substitute Youssef El Arabi scored a 78th minute equalizer to deny the Blue Sharks its bid to become the smallest ever nation to win a game at the tournament.
Appearing in its first Africa Cup of Nations since gaining independence from Portugal in 1975, many expected Cape Verde to struggle on the international stage.
But having defeated Cameroon in qualifying and held South Africa to a 0-0 draw in its opening game, Cape Verde's players showed little fear.
And with 35 minutes on the clock, Ryan Mendes' pass released Platini and the striker produced a wonderfully deft finish to place the ball into the net.
That goal looked to have secured a famous victory for Cape Verde but Morocco refused to lie down and with just 12 minutes left, El Arabi popped up to fire home a leveler.
"We made another draw, but we are still alive. I am very happy with this result -- a great one for our country. My players worked very well and proved they have qualities," Cape Verde coach Luis Antunes told reporters.
The result leaves both teams in with a chance of qualifying having taken two points from the opening two games.
Meanwhile, there was bad news for Tunisia after its star striker Issam Jemaa was ruled out of the rest of the tournament with a knee problem.