Bail of $10m (£5m) has been set for Kenny Richey, the Scottish man who has been on death row in Ohio for more than 20 years.
Richey, 43, now faces a new trial which is expected to focus on the much-criticised forensic evidence in the case.
His fate has been a cause célèbre for years because of the grave doubts about the entirely circumstantial evidence that led to his conviction. At one stage of his incarceration he was an hour from execution.
The case has been described by Amnesty International as "one of the most compelling cases of apparent innocence that human rights campaigners have ever seen", while in August a federal court in Ohio ruled that Mr Richey's capital conviction was unsound and ordered that he be either released or retried.
Later that month, Ohio's attorney general and a county prosecutor announced that he would be retried, something he himself had long called for.
Mr Richey attended yesterday's court hearing and told supporters he was stunned by the bail demand, of which he has to come up with 10 per cent in order to be freed. Judge Alan Travis also ordered that Richey, from Edinburgh, be placed under 24-hour house arrest if released.
Born to a Scottish mother and American father, Richey was raised in Scotland but moved to Ohio to join his father in 1982. He was convicted in 1987 of the murder of two-year-old Cynthia Collins by arson.
At about 4:15am on 30 June, 1986, a fire broke out in the second-floor apartment where he was staying, killing Cynthia. The girl's mother, Hope Collins, had left her apartment with a convicted drug dealer and faced prosecution for child abandonment.
At the trial, the prosecution successfully persuaded the jury that a drunken Richey was so angry at his former girlfriend, Candy Barchet, that he set fire to the apartment above theirs'.
The fire, it was claimed, was meant to burn through the concrete floor and kill them while they slept. The prosecution accepted that Richey knew that Cynthia was asleep in that apartment and that during the fire he had risked his life trying to rescue her.
Richey's lawyers have maintained that no arson took place, and therefore no crime. They say the death was a tragic accident and that conflicting circumstantial evidence along with widely discredited forensic evidence resulted in an unsafe conviction.
At the heart of the trial was a piece of carpet removed from the burnt-out flat that was contaminated with petrol. Although the carpet had been in the open near petrol pumps for weeks, it was still admitted as evidence in the trial.