The Court of Arbitration for Sport (CAS) has cleared South Korean swimmer Park Tae-hwan to compete in next month's Olympic Games in Rio.
Park, Olympic champion in the 400m freestyle eight years ago, served an 18-month suspension after testing positive for testosterone in 2014.
However, although the ban imposed by FINA - the international governing body for swimming - ended this March, the Korean Olympic Committee (KOC) ruled Park ineligible due to their regulations prohibiting athletes from representing the nation within three years of serving a doping suspension.
Park challenged the enforceability of those regulations and sought an urgent ruling from CAS ahead of Friday's deadline for the selection of the Korean swimming team for Rio 2016.
A statement from CAS read: "The Court of Arbitration for Sport has upheld a request for provisional measures filed by the Korean swimmer Tae Hwan Park in the course of his arbitration procedure with the Korean Sport and Olympic Committee (KOC) and the Korea Swimming Federation (KSF).
"The decision issued by the president of the CAS Appeals Arbitration Division means that he is eligible to be selected to swim for the Korean team in the Rio 2016 Olympic Games."
The KOC duly confirmed it would respect the verdict of CAS and include Park in the team headed for Rio.