Gasquet reached a career-high ranking of seven in 2008
France's Richard Gasquet has been cleared to return to competitive tennis after testing positive for cocaine.
The 23-year-old, ranked 32nd in the world, was provisionally suspended in May after failing a doping test at the Miami Masters in March.
But the International Federation (ITF) accepted his defence that "the cocaine entered his system through inadvertent contamination in a nightclub".
He was given a suspension of two months and 15 days, which ended on Wednesday.
"I am really happy, to put it simply, to return to the courts. It's a great joy," said Gasquet.
"Justice has been done. It has been terrible in the last two months, an extraordinary pain. I couldn't go to either the French Open or Wimbledon."
It's a happy end to a painful ordeal
The ITF's independent anti-doping tribunal found that "while he was at fault in exposing himself to the risk of such contamination, that fault was not significant.
"It further ruled that, in the exceptional and 'probably unique' circumstances of the case, it would be unjust and disproportionate to impose a 12-month sanction on Mr Gasquet."
At a hearing in London on 29 and 30 June, the tribunal found that he had tested positive for benzoylecgonine, a metabolite of cocaine, and rejected his suggestion that, because he withdrew from the tournament, it should be treated as an out-of-competition test.
After deciding to withdraw from the tournament, Gasquet went to a nightclub with friends to see a French DJ perform at a dance music festival in Miami, which the tribunal noted was "notoriously associated with use of illegal recreational drugs including cocaine".
Gasquet told the tribunal that he kissed a woman, identified in the ruling only as "Pamela", and suggested that was how the cocaine entered his system.
The tribunal stated, "this explanation is more likely than not to be the correct one", and said that it "found the player to be a truthful and honest witness, and a man of integrity".
It added that the quantity of cocaine detected in Gasquet's sample was "very small, about the size of a grain of salt".
Gasquet turned professional in 2002 and has won five singles titles and more than US$4m (£2.7m) in prize money during his career.
"It's a happy end to a painful ordeal," the Frenchman told French radio. "I'm delighted to be able to start competing again. Now, it's back to tennis."