Peru captain Paolo Guerrero has been cleared to play in the FIFA World Cup in Russia after his doping ban was temporarily lifted by a Swiss court on Thursday.

Guerrero tested positive for cocaine metabolite benzoylecgonine following Peru’s World Cup qualifier against Argentina in Buenos Aires on Oct. 5.

He claimed that he unwittingly consumed the substance in contaminated tea and that it did not enhance his sporting performance.

The Swiss Federal Tribunal said it granted an order to freeze Guerrero’s 14-month ban during the World Cup, which starts on June 14. The tournament will mark Peru’s first appearance in football’s biggest event since 1982.

“The president of the court took into account the setbacks of all types that the appellant, already aged 34, would suffer if (he) was prevented from participating in a competition that will be the culmination of his career as a footballer,” it said in a statement.

According to the court, Guerrero “did not act intentionally or with significant negligence.”

It added that an appeal to overturn the ban would be considered at a later date.

In a statement issued through his lawyer, Guerrero expressed gratitude and said he would continue to fight to clear his name.

“Justice has been done, at least partially,” said the Flamengo striker, who is Peru’s all-time leading scorer with 32 goals in 86 international matches.

“Millions of compatriots have united with me, in thousands of different ways but with one common denominator; their undying affection.”

Thursday’s announcement prompted celebrations in Peruvian capital Lima, where football fans gathered outside the home of Guerrero’s mother, Dona Peta.

Peruvian President Martin Vizcarra said Guerrero had called him personally to thank him for his support.

“I appreciate the kindness of Paolo Guerrero,” Vizcarra told Canal N. “At 7:30am he called me from Switzerland to personally confirm the news. And I have given my congratulations and I have also sent the goodwill of the 32 million Peruvians.”

Guerrero was given a 12-month ban last December but the penalty, backdated to November, was halved less than two weeks later by FIFA’s appeal committee.

However the Court of Arbitration for Sport extended the penalty by eight months on May 14 after a challenge by the World Anti-Doping Agency.

The new ruling barred the former Bayern Munich player from all football-related activities until next January.

Last week, the captains of Peru’s World Cup Group C rivals – Australia, France, and Denmark – signed a letter asking FIFA to reconsider the ban.