The Moroccans made six changes to their starting line-up, choosing to use pace to attack the South Africans since they were desperate for a win to progress ahead of the hosts.

If Bafana were over-confident after their Angola win, the early running by Morocco would have reminded them that they were in a match here and still had it all to do to progress to the quarter-finals.

In the first five minutes, South Africa were beaten for pace on a number of occasions. Early on Youssef El Arabi broke through ahead of Itumeleng Khune, but the South African keeper was on hand to swat it clear.

Tokelo Rantie gave the visitors some of their own medicine when he beat them for pace down the right. It seemed that Ahmed Kantari might have pulled his hand before falling, but the referee Bakary Gassama waved away the protest. The South African striker, who managed to pass his fitness test before the game, probably did fall too easily.

A minute later Khune missed a swerving corner kick, and the tall Issam El Adoua stood up to head home an easy opener for Morocco. From the replay it wasn't clear whether Khune or El Adoua had the last touch before the ball dropped in off the crossbar.

Literally another minute later, at the other end Thuso Phala was brought down in the penalty area.  There was contact but again the South Africans were falling too easily.

With the home side looking to move forward Morocco were not resting on their lead, and came close to adding a second. First, El Arabi saw his shot take a deflection that was well saved by Khune for a corner. The resulting set piece again troubled the South Africans as the goalscorer El Adoua won the header, but directed it slightly to the left of the post.

Bafana were relieved to survive the period of pressure, having one eye on the Cape Verde-Angola game, as they would still progress if Cape Verde failed to win. However they were not relying on anyone, responding well with a number of spirited attacks before the half hour.

Just before the break, Morocco caught the defence out, playing through Kamel Chafni who was clean through with acres of space, but this time Khune came off his line early enough to stop him in his stride outside the box.

After 50 minutes, South Africa manager Gordon Igesund introduced his ace in the pack, the attacking midfielder Thulani Serero to make things happen, but striker Katlego Mphela had to make way.

Bafana's best moment was immediate with a wonderful free kick from Phala acrobatically saved by keeper Nadir Lamyaghri. Phala was again in the thick of the action, weaving his way down the right but the Moroccan defence stood strong.

Once again the Morrocans beat the slow Bafana defence for pace as El Arabi was clean through. This time Sangweni was at fault misjudging a header. El Arabi chose to chip, but Khune came up with an outstanding save, swatting it away.

It was end to end stuff as Thulani Serero then tried his best to make an impression, shooting from just outside the box and Nadir Lamyaghri did well to gather. Though, Phala was Bafana's most effective player and took a brilliant, curling free kick that was parried away for a corner.

Poor communication at the back resulted in South Africa failing to clear the ball, and the Moroccans pushed men forward into the open space. The ball was slid through for Chafni who skied it over the bar. The visitors would pay for their missed opportunities, and once again Bafana took a shot from outside the box. This time Mahlangu playing a one-two with Rantie and then curling the ball beautifully into the top right corner of the net for the equaliser.

The Moroccans stretched the Bafana defenders to the corner flag, and then cut back a cross with very little cover in the box. Abdelilah Hafidi chested it down well, before firing in with his left leg across Khune. But, that wasn't the last statement of what proved to be an exciting game. Defender Siyabonga Sangweni ambitiously lurked forward, when a loose ball was pounced on by the Bafana midfield with sheer determination.

Sangweni chose to curl it around the keeper and when it hit the target you had to wonder if they've been practicing these curled, long range strikes in training. Whatever the case, South Africa owe their undefeated record to these beauties and Sangweni is now Bafana's leading scorer in the tournament with two goals.