The South African double Olympic 800m champion, 32, had approached the European Court of Human Rights in February, 2021 after losing appeals to CAS, sport's highest court, and the Swiss Federal Tribunal (SFT) in a long-running legal battle.
The ECHR ruled, by a slender majority of four votes to three, that Semenya's original appeal against World Athletics regulations had not been properly heard.
"The Court found in particular that the applicant had not been afforded sufficient institutional and procedural safeguards in Switzerland to allow her to have her complaints examined effectively," ECHR said in a statement.
"The high stakes of the case for the applicant and the narrow margin of appreciation afforded to the respondent State should have led to a thorough Institutional and procedural review, but the applicant had not been able to obtain such a review."
Semenya may now be free to challenge, once again, rules that have left her career on hold, but there is still some way to go in that regard.
During a three-month period following the ECHR judgement it is not final and any party may request that the case be referred to the Grand Chamber of the Court.
If such a request is made, a panel of five judges will consider whether it deserves further examination. In that event, the Grand Chamber will hear the case and deliver a final judgment.
World Athletics said it stood by its rules, which would remain in place for now, and added they will encourage the Swiss Government to ask for a review of the judgement.
"We remain of the view that the DSD regulations are a necessary, reasonable and proportionate means of protecting fair competition in the female category as the Court of Arbitration for Sport and Swiss Federal Tribunal both found, after a detailed and expert assessment of the evidence," World Athletics said in a statement.
"We will liaise with the Swiss Government on the next steps and, given the strong dissenting views in the decision, we will be encouraging them to seek referral of the case to the ECHR Grand Chamber for a final and definitive decision."
Semenya has a medical condition known as hyperandrogenism, which is characterised by higher than usual levels of testosterone, a hormone that increases muscle mass, strength and haemoglobin, which affects endurance.
Under the rules, in order to compete in women's events, athletes with differences in sexual development (DSDs) that result in high testosterone levels must lower them to those of "a healthy woman with ovaries". They may take the contraceptive pill, have a monthly injection or undergo surgery to remove testes.
The Court of Arbitration for Sport ruled in 2019 that World Athletics' rules were necessary for fair female competition.
At the time, Semenya said the rules were discriminatory, and contraceptive pills made her feel "constantly sick". She lost her appeal to the SFT the following year to set aside the 2019 CAS ruling.
Semenya won gold in the women's 800m at the 2016 Olympics and is also a three-time world champion in the distance.
The regulations, initially applied to races of 400m to a mile, were expanded in March to include all female track events, preventing Semenya from relaunching her career by running longer distances.
Reuters, the news and media division of Thomson Reuters, is the world's largest multimedia news provider, reaching billions of people worldwide every day.Go to: https://www.reuters.com/