(MOSCOW) — A Moscow court has upheld a decision to release an American man who spent almost two years in a Russian jail after he was put on trial over a cleaning product he bought online.Gaylen Grandstaff, a 54 year-old English teacher from Texas, was arrested in 2017 and spent 608 days in pre-trial detention in Moscow as prosecutors sought to jail him on drug smuggling charges. One of the few Americans to spend so much time in a Russian prison, he was held in grim conditions, harassed by guards, severely beaten by other inmates and denied medical assistance. ABC News chronicled Grandstaff and his Russian wife, Anna’s ordeal in a short film earlier this year.In March, Grandstaff was unexpectedly freed after a judge suddenly acknowledged serious problems with the case. In the ruling, the judge found the prosecution had failed to gather basic evidence and sent the case back for further investigation. Grandstaff was released in the courtroom and was allowed to return to the apartment where he and Anna live in Moscow.The prosecution, however, appealed the ruling, leaving the threat that Grandstaff could be returned to jail. With the case still open, he has been unable to leave Russia, left instead in limbo for 9 months while authorities ignored deadlines to hold a hearing.On Monday, Moscow’s highest appeals court rejected the prosecutors’ request. The judge at Moscow’s City Court upheld in full the March ruling to keep Grandstaff free and confirmed that the case lacked basic evidence to go forward.Monday’s ruling removes all charges against Grandstaff and returns the case to the stage of preliminary police investigation. That means the while the case is still not formally closed– investigators now must decide whether to formally drop it— it at last clears a path to him finally being able to go home.“I feel quite spectacular right now,” Grandstaff said outside the court. “It’s a very good feeling. I didn’t really let myself entertain much of the idea of going home. Right now it seems like a step closer.”In Russia, less than 1 percent of criminal trials end in acquittal, making Grandstaff’s release extraordinary. Inherited from the Soviet Union, the Russian judicial system is most often a conveyor belt of convictions, where evidence is routinely fabricated and defendants are essentially treated as presumed guilty.When Grandstaff will be able to leave Russia is still not clear. Grandstaff’s Russian visa expired while he was in jail and was never renewed, meaning he has been in an immigration gray zone where it is simultaneously illegal for him to work in Russia but is also impossible for him to leave. The next step is for the Grandstaffs to try to receive a visa to exit Russia. It also still unclear that he might not be stopped at the border because the police investigation is still on the books.“Legally I think I should be able to leave but whether or not they would actually let me leave may be another,” Grandstaff said on Monday.The case against Grandstaff held serious problems from the beginning. The cleaning product he bought from the Chinese website Ali Express turned out to contain gamma-butyrolactone or GBL, an industrial cleaner that is sometimes used as an illegal party drug or more rarely as a muscle-builder and which is banned in Russia and many other countries as a narcotic. Grandstaff said he had been upsold the cleaner by the Chinese vendor while he was shopping online for medication for his Crohn’s disease and had had no way of knowing it contained the banned substance.Police though charged Grandstaff with large-scale drug smuggling, a heavy offense that carries a maximum prison sentence of 10-20 years and is intended to prosecute major traffickers. But the case made little sense– first they accused Grandstaff of buying the cleaner to sell, but then switched to alleging he intended to use it for personal body-building. Despite that, they continued to press the serious drug smuggling charge while arguing Grandstaff had bought the GBL for his own fitness. Needing to paint Grandstaff as a fitness obsessive, they then appeared to use crude tactics to do so, including distorting a testimony according to one witness. A judge continued to prolong Grandstaff’s detention for months, despite the evidence provided by the prosecution remaining mostly unchanged.Ultimately, rights advocates and legal experts said even if Grandstaff had known what he was buying the charge brought against him was excessively severe, likely driven by prosecutors seeking to appear effective on drugs cases and unable to reverse once charges were brought. Grandstaff’s long detention and then legal limbo after his release are typical of the Russian justice system, where prosecutors have little incentive to drop charges and are permitted to let cases languish for months.Copyright © 2019, ABC Audio. All rights reserved.