The Court of Arbitration for Sport released its ruling less than 12 hours after a hastily arranged hearing that lasted into early Monday morning that the 15-year-old Valieva, the favorite for the women's individual gold, does not need to be provisionally suspended ahead of a full investigation.
The court gave her a favorable decision in part because she was a minor or "protected person" and was subject to different rules from an adult athlete.
"The panel considered that preventing the athlete to compete at the Olympic Games would cause her irreparable harm in the circumstances," CAS Director General Matthieu Reeb said.
Now, Valieva and her fellow Russian skaters can aim for the first podium sweep of women's figure skating in Olympic history. The event starts with the short program Tuesday and concludes Thursday with the free skate.
Shortly after the decision, Valieva skated in her allotted practice time slot.
The CAS panel also cited fundamental issues of fairness in its ruling, the fact she tested clean in Beijing and that there were "serious issues of untimely notification" of her positive test.
Valieva tested positive for the heart drug trimetazidine on Dec. 25 at the Russian nationals but the result from a Swedish lab didn't come to light until a week ago, after she helped the Russian Olympic Committee win the team gold.
Reasons for the six-week wait for a result from Sweden are unclear, though Russian officials have suggested it was partly because of a January surge in omicron variant COVID-19 cases, which affected staffing at the lab.
Her case has caused havoc at the Olympics since last Tuesday when the team event medal ceremony was pulled from the schedule.
The Russian anti-doping agency (RUSADA) immediately suspended her, then lifted the ban a day later, putting into limbo the awarding of the medals. The IOC and others appealed and an expedited hearing was held Sunday night. Valieva testified via video conference.
Athletes under 16 like Valieva have more rights under anti-doping rules and typically aren't held responsible for taking banned substances. The focus of any future investigation will home in on her personal team - coaches, doctors, nutritionists, etc.
This ruling only addresses whether Valieva can keep skating before her case is resolved. It doesn't decide the fate of the one gold medal she has already won.
Valieva landed the first quadruple jumps by a woman at the Olympics when she won the team event gold with the Russian Olympic Committee last Monday. The United States took silver and Japan the bronze. Canada placed fourth.
That medal, and any medal she wins in the individual competition, could still be taken from her.
Those issues will be dealt with in a separate, longer-term investigation of the positive doping test that will be led by RUSADA, which took the sample in St. Petersburg.
The World Anti-Doping Agency will have the right to appeal any ruling by RUSADA, and also said it wants to independently investigate Valieva's entourage.
With the Valieva case, questions raised by an often-proven culture of doping in Russian sport has been a major theme for a sixth straight Olympic Games, including the past three winter editions at Sochi, Russia; Pyeongchang, South Korea; and now Beijing.
"This appears to be another chapter in the systematic and pervasive disregard for clean sport by Russia," US Olympic and Paralympic Committee CEO Sarah Hirshland said in a statement.
Hirshland said the USOPC was "disappointed by the message this decision sends" and suggested athletes were denied the confidence of knowing they competed on a level playing field.
At the rink Tuesday, the ice dance competition was decided as the CAS prepared its verdict.
Gold medalists Gabriella Papadakis and Guillaume Cizeron of France and American bronze medalists Madison Hubbell and Zachary Donohue offered, "No comment."
Nikita Katsalapov, who along with Victoria Sinitsina won the silver medal for the Russians, said simply: "Go Kamila!"
Hubbell and Donohue could have their silver medals upgraded to gold in the team competition if the Russians are stripped of their title at a later date.
"There's no done deal yet, but I know all the people in the team want to receive the medals here as a team'" Hubbell said. "If we miss that opportunity, it's huge disappointment."
The IOC had asked for the entire Valieva doping case to be resolved in Beijing, which was unrealistic. The IOC, though, can now reschedule a team skating medal ceremony.