England defender John Terry has said he was "very angry and upset" when he thought Anton Ferdinand had accused him of racism.
Terry, 31, is accused of calling Ferdinand a "f****** black c***" during a Premier League match on October 23 last year.
He says he was sarcastically repeating the words that QPR centre-half Ferdinand mistakenly thought he had used.
Terry is accused of a racially aggravated public order offence, which he denies. He told Westminster Magistrates' Court that as the pair traded insults, he heard Ferdinand say: "calling me a black c***".
"I thought he was accusing me of calling him a black c***. I was very angry and I was upset. I replied 'a black c***, you f****** k**bhead'".
The father of two, wearing a dark suit, had to be told to keep his voice up at times as he gave evidence. He said he was "frequently" insulted on the pitch and had "heard it all before". The Chelsea defender said: "It's part and parcel of the game, you just get on with the game basically."
He said he would be taunted about allegations of an affair with former team-mate Wayne Bridge's ex-girlfriend at "more or less every game". But he said he would "just laugh it off basically".
Terry admitted that after the match, he asked Ferdinand twice if he had accused him of using the racist obscenity. He told the court: "I said: 'I thought you were accusing me of calling you a black c***'. His reply to that was 'no,no,no. We all said things we shouldn't have said, that's the end of it'. I asked him twice and he said no, I thought that was the end of it."
In cross examination, prosecutor Duncan Penny put it to Terry that insults about the alleged affair were a "no-go area". He asked why, on Terry's account, he had repeated the racial abuse because he thought Ferdinand was accusing him of using the slur.
Terry replied: "At the time I was shocked and angry," and he went on: "Hindsight's a wonderful thing. At the time I was shocked, I was angry, you can't control your emotions." But he denied that he had "snapped" with Chelsea struggling in the match and after being insulted.