Costa Rica took the lead as early as the seventh minute when dangerman Andy Reyes played a one-two with his midfield to break free, received the ball just outside the South African box down the right channel and played a perfect ball to the far post for Kevin Masis to slide home, cutting open the Amajimbos left side like a hot knife through butter.
Roberto Cordoba had a sight of goal in the 14th minute when the ball fell kindly to him following a poor defensive clearance but his shot was straight at goalkeeper Mondli Mpoto, who had a couple of nervy moments but generally had a good game.
Mpoto was called into action just before half-time when a brilliant through-ball from Jonathan Martinez found Reyes’ clever diagonal run. The attacker got to the ball before the goalkeeper, who went to ground, but luckily Costa Rica were unable to profit from a resultant cross towards his unguarded goal as Wiseman Meyiwa made an important tackle on the edge of the area.
Molefi Nseki's team showed more attacking intent at the start of the second half but were let down by some poor decision-making in the final third and an off night for striker Khanyisa Mayo, who missed a great chance to score in the 58th minute when Wiseman Meyiwa's cross from the right found him stretching at the far post, but his left-footed attempt went high and wide from six yards out with the goal at his mercy.
Just before that Athenkosi Dlala, who looked impressive and had a good game running from box to box spreading the passes around the pitch, tried his luck from a direct free-kick but Costa Rica goalkeeper Alejandro Barrientos was equal to the task.
Then Amajimbos were dealt a cruel blow with 30 minutes remaining as Katlego Mohamme was adjudged to have handled the ball to block a fierce shot from Cordoba, although the ball looked to have struck the defender's shoulder, although he did lean in towards the ball to make the contact. Nevertheless, the shot was going well wide...
The referee pointed to the spot, Reyes stepped up, and he made no mistake despite Mpoto diving the right way, 2-0 to Costa Rica.
Mayo missed another gilt-edged chance a few minutes after the second goal, this time timing his run well to receive Nelson Maluleke's pinpoint pass, but his first-time, sidefoot volley failed to hit the target, again unmarked.
It was a bad time for South Africa's top scorer to have an off night, although he did pull a goal back in the 90th minute when he rose at the far post to loop a header back over Barrientos from impressive left-back Reeve Frosler's right-footed cross.
Try as they may, the goal came too late and brave Amajimbos could not breach the Costa Rican defence again as the South Americans moved top of Group E.
South Africa's next clash is against Korea DPR on Thursday, while Costa Rica face Russia in the day's other Group E clash.
South Africa: Mpoto, Frosler, Mohamme, Mukumela, Nqoi, Dlala, Meyiwa (Mkatshana 69'), Maluleke (c), Mbatha, Kodisang (Qinisile 81'), Mayo
Costa Rica: Arboine, Smith, González, Hernández (c), Reyes (Ramirez 76'), Martínez (Salazar 64'), Cordoba (Sequeira 87'), Masis, Villegas, Juarez
FIFA team sheet: