Former England footballer Trevor Sinclair has admitted drink driving and racially abusing a police officer.
Sinclair was arrested in Lytham and became agitated and accused police of being racist, a court was told.
Blackpool Magistrates’ Court heard he racially abused the officer who arrested him, but has since accepted the police were not racist towards him.
Sinclair has been sentenced to 150 hours of unpaid work and disqualified from driving for 20 months.
He has also been ordered to pay £500 compensation to the police officer he abused.
Solicitor Nick Freeman said Sinclair was “totally appalled by his behaviour, embarrassed and contrite”.
The court also heard that Sinclair, 44, urinated in a police car during the arrest in his hometown on 12 November.
After Sinclair pleaded guilty to drink driving and a racially aggravated public order offence, the prosecution dropped other charges including assault on a police officer, failing to provide a specimen and criminal damage.
The court heard that police were called to his home and told he had left in his car and might have been drinking.
Officers found the BBC pundit’s car stopped on Clifton Drive, Blackpool after he was involved in a collision with a woman getting out of a taxi.
He was breathalysed and found to be twice the legal alcohol limit, the court was told.
A statement from the officer who arrested him was read to the court.
PC Gareth Evans said the former footballer had been “calm, polite and courteous” before his arrest but started “getting more confrontational”.
When Sinclair was put in the back of the police van, he made racist comments.
He continued to be “obnoxious, aggressive and racist while being booked in”, the officer said.
Mr Freeman said the “catalyst” for his client’s behaviour was being subjected to racism in front of his family while out having a meal hours earlier.
Sinclair played 12 times for England, winning four caps during the 2002 World Cup.
His clubs included Blackpool, QPR, West Ham, Cardiff and Manchester City.