Ali Williams arrives at court in Paris where he is convicted and fined for buying cocaine.

Former All Blacks lock Ali Williams has been fined €1500 (NZ$2300) in a Paris court after being convicted of buying cocaine.

The sentence was delivered on Wednesday (NZT Thursday) at a court hearing in the French capital at the Palais de Justice.

Williams, 35, arrived early for the hearing and waited around two hours for his case to be heard. He apologised for his actions.

CHARLES PLATIAU/ REUTERS Ali Williams goes through security on his way into court where he was convicted and fined for buying cocaine in central Paris.

One News reported the judge warned Williams that "in case you do it again, the court will know about it".

READ MORE:

* Williams apologises for 'inexcusable' actions

GETTY IMAGES James O'Connor has returned to training with his French club Toulon after he was arrested for drug possession in February.

Williams ignored all questions by media waiting outside the court before and after the hearing, though his lawyer, Cyril Banon, commented: "It was a good result for the former All Black."

Williams and former Wallabies player James O'Connor were arrested in late February, and O'Connor has already been fined for possession of the drug. The pair will also face a French rugby disciplinary hearing into their arrests on April 12.

They were set to front the Ligue Nationale de Rugby's discipline and rules commission on March 29, but the hearing was postponed, reportedly at their request.

They were suspended by their respective clubs and told they had no long-term future at either outfit, though O'Connor returned to training with Toulon last month as he looks to complete the final season on his current contract.

Racing 92 sacked Williams from his ambassador's role with the Paris club.

French news agency AFP reported that, according to police, the two men were arrested while in the act of buying cocaine from two suspected drug dealers. Plain clothes officers saw Williams in a car with the two suspects while O'Connor was outside and appeared to be acting as a lookout, police said.

When they were challenged, Williams attempted to get rid of the cocaine by throwing it away, added the police source who said the two players had clearly been drinking.

The popular Williams played 77 tests for the All Blacks and helped them win the 2011 Rugby World Cup in New Zealand.