James O'Connor is one of two rugby players charged with attempting to buy cocaine in Paris ©Getty Images

Former rugby internationals Ali Williams. of New Zealand, and Australia's James O'Connor have been charged with drug offences in Paris.

The pair were allegedly caught by undercover officers buying 2.4 grams of cocaine outside the L’Arc nightclub in the French capital.

Police, quoted by Agence France-Presse, alleged Williams was seen in a car with two suspected drug dealers.

O’Connor waited on the street, while Williams got into the vehicle.

As he and O’Connor moved to walk back into the nightclub, officers then made the arrest.

O'Connor, the 26-year-old back, plays for French club Toulon, while former All Blacks lock Williams plays for Paris based Racing 92.

Williams has been suspended by his club.

"A player of Racing 92 is at the heart of an investigation into the purchase and possession of cocaine," the club said in a statement.

"In this context, it was decided to suspend Ali Williams.

"If the investigation confirmed the possession of cocaine and the transaction, it would not only be against the law but also a serious fault in terms of our ethics."

Ali Williams, left, was the second player arrested in the French capital ©Getty Images
Ali Williams, left, was the second player arrested in the French capital ©Getty Images

So far, Toulon have not taken any action against O'Connor.

A World Cup winner in 2011 with 77 Test caps, 35-year-old Williams announced his retirement from international rugby two years ago. 

O'Connor played the last of his 44 Tests for Australia in 2013 after he was thrown out of the team following an incident at Perth Airport, which saw him ejected from the building.

He had harbored hopes of playing for Australia again, saying he "had matured" in an interview with News Ltd media earlier this month.

The duo's court dates are yet to be confirmed.

Last year, former All Blacks stars Dan Carter and Joe Rokocoko were cleared by the French Rugby Federation, along with Argentinian international Juan Imhoff, after an investigation into possible failed drugs test while playing for Racing 92.

Patrick Tuipulotu has also been cleared in recent weeks.

The 24-year-old lock, who has won 12 caps for the All Blacks, was provisionally suspended after a sample tested positive for an unspecified substance on the World Anti-Doping Agency’s banned list.

However, his B-sample has returned from Sports Medicine Research and Testing Laboratory, a United States-based laboratory, as negative, meaning the ban has been lifted.