South Africa's Herschelle Gibbs has been banned for two Test matches for making racist comments during the first Test against Pakistan.
The ban, imposed by match referee Chris Broad, was half the maximum penalty for an offence of this sort.
His words were picked up by the stump microphone and broadcast on television during day four in Centurion.
Cricket South Africa said the comments were made after fielder Paul Harris was abused by members of the crowd.
Several unruly spectators were ejected from the ground on Sunday's fourth day in Centurion.
"Herschelle says these remarks were for the ears only of his team-mates in his proximity," said chief executive Gerald Majola.
"He has apologised if he has caused offence to anyone."
Gibbs, who hit 94 in the first innings of the seven-wicket win at Centurion Park, near Pretoria, will miss the rest of the series against Pakistan.
Gibbs' comments were picked up on live television
CSA has also organised its own disciplinary hearing, set to take place on Tuesday and headed by former judge Mervyn King.
Rule 3.3 of the International Cricket Council code of conduct prohibits using " ... any language or gestures that offends, insults, humiliates, intimidates, threatens, disparages or vilifies another person on the basis of that person's race, religion, colour, descent or national or ethic origin."
Gibbs pleaded not guilty to the level three charge but guilty to a level one offence, that does not mention racism.
Broad said: "I took into account the mitigating circumstances that the players were provoked by unruly spectators.
"However, the remark was racially offensive, the player admitted saying it and on that basis I am content that the level of the charge and the resulting punishment is appropriate.
"Cricket has a zero tolerance of racism, as has been illustrated by the introduction last year of an amended ICC Anti-Racism Code, and this decision is an illustration of that fact."
The remark was racially offensive, the player admitted saying it and on that basis I am content that the punishment is appropriate
The last leading player to be given a ban for a racist outburst was Australia's Darren Lehmann, who was suspended for five one-day matches in the run-up to the last World Cup after an incident against Sri Lanka.
Captain Graeme Smith said he could not condone Gibbs' action but he made strong comments about the circumstances which led to the incident.
"There was quite a lot of racial abuse from the Pakistan fans towards our players and I think that provoked a lot of what happened," he said.
"Herschelle was down at third man and he was copping a lot of abuse and I think even racial abuse.
"The worrying thing is that Pakistan always have a large support base around the world. Security needs to be looked at.
"There was an incident where Makhaya [Ntini] was hit on the head by a Pakistan flag going up the stairs.
"The guys were provoked and that is why they are angry but we understand that what Herschelle did was wrong."
This is the second time Gibbs has been banned from the international game.
Herschelle was down at third man and he was copping a lot of abuse and I think even racial abuse
South Africa captain
He was suspended for six months in 2000 for accepting a bribe to play poorly in a match against India, although he subsequently went back on the agreement.
The second one
Afridi rocked by four-match ban
Shahid Afridi will miss the first two matches of the World Cup after receiving a four-match suspension for his altercation with a spectator.
The Pakistan all-rounder reacted to an alleged comment after being dismissed in the first one-day international with South Africa in Durban last Sunday.
He was charged with "conduct unbecoming which could bring [players, officials] or the game into disrepute".
Match referee Chris Broad said: "Such an act is completely unacceptable."
Afridi was at his blistering best in Pakistan's victory in Durban
When Afridi made his way back to the pavilion after being dismissed during a 164-run defeat in the opening match, a spectator apparently sais something to anger the all-rounder.
Afridi appeared to push his bat towards the spectator, who took evasive action.
Finding the player guilty of a level three offence, Broad added: "I took into account what I considered the mitigating circumstances of a spectator in close proximity to the player shouting at him as he returned to the dressing room.
"I also spoke to the spectator in question ahead of the hearing to get his version of events.
"However, I found it impossible to escape the conclusion that Mr Afridi's actions were a clear threat to that spectator, and had that person not taken evasive action then the bat would almost certainly have hit him."
Pakistan's assistant manager, Asad Mustafa, said Afridi would not appeal against his punishment and would return home on Sunday.
Pakistan have two ODIs remaining on this tour, with their next assignment the World Cup opener against West Indies on 13 March, followed by a game against Ireland.
Afridi blasted 77 off only 35 balls in the second match of the series, which Pakistan won by 141 runs to level the series at 1-1.
His colleague Imran Nazir was cleared of any charge following a bust-up with Andre Nel in the same game, but Broad warned both teams over their behaviour in the series.
I found it impossible to escape the conclusion that Mr Afridi's actions were a clear threat to that spectator
Match referee Chris Broad
"I have seen indications of rising tensions among the two sets of players over the course of the Test and ODI series," he said.
"I wished to remind everyone of their responsibilities to each other and the game in ensuring everyone upholds the spirit of cricket.
"I believe my message was understood and I look forward to seeing the remainder of matches in this series played in the best traditions of top level cricket, hard but fair."