Cape Verde beat South Africa 2-1 in the 2018 FIFA World Cup Qualification Group D match at the Estadio Nacional de Cabo Verde in Praia on Friday.
As a result, the Blue Sharks remain fourth on position four on the Group D table, while Bafana also remain second on the standings ahead of the return leg game in South Africa next week Tuesday.
The match got off a lively start and the visitors managed to break the deadlock through Tokelo Rantie, who scored against the run of play in the 13th minute to make it 1-0 to South Africa.
However, the lead lasted for 20 minutes as Nuno Rocha level matters with a deflected effort with the Bafana defence caught ball watching.
The Blue Sharks continued to press Bafana and they managed to take the lead for the first time eight minutes before the half-time.
Ryan Mendes was fouled by Dean Furman in the South Africa box and Rocha grabbed his brace as he converted from the spot-kick to make it 2-1 to Cape Verde.
Cape Verde were leading 2-1 at the interval after dominating possession in the half-time and Rocha netted twice for the hosts.
South Africa dominated the opening stages of the second-half as they searched for equalizing goal - pushing more men forward.
However, Bafana were reduced to 10 men when Erick Mathoho got a straight red card after fouling Cape Verde defender Carlos Ponck in the 67th minute.
Cape Verde nearly extended their lead six minutes later, but Julio Tavares failed to punish the Bafana defence as he was denied by South Africa keeper Ronwen Williams.
The last chance of the match fell for South Africa striker Percy Tau with five minutes left on the clock with the Cape Verde defence caught ball watching.
However, the Mamelodi Sundowns attacker missed the target and Cape Verde held on to win 2-1 over South Africa at home.
Cape Verde (2) 2 (Rocha 33', 37')
South Africa (1) 1 (Rantie 13')
Cape Verde: Dias. Almeida, Stopira, Rodrigues, Vally (Pereira 17'), Soares, Rocha (Da Cruz 78'), Babanco, Fernandes, Tavares, Mendes.
South Africa: Williams, Langerman, Mathoho, Hlatshwayo, Mphahlele, Furman, Zungu (Mokotjo 61'), Dolly, Zwane, Manyama (Grobler 53'), Rantie (Tau 79').