A court has agreed to Kenny Richey's release after he spent more than 20 years behind bars in America - many of them on death row.
The former US marine was sentenced to death in January 1987 after his conviction for killing a two-year-old child in Ohio in 1986.
The case has taken a number of dramatic twists and turns, including his conviction being overturned twice, the prospect of retrials and the plea bargain which eventually secured his release.
Here is how events unfolded.
3 AUGUST 1964
After Kenny Richey is born in Holland to an American father and Scottish mother, his parents move to Edinburgh when he is a baby.
Following his parents' divorce, Richey moves to the US to live with his father in Columbus Grove, Ohio.
Richey moves to Minnesota where he meets his future wife, Wendy, and joins the US Marines.
Richey is discharged from the Marines and, after his marriage fails, he returns to Columbus Grove to live with his father.
30 JUNE 1986
One week before Richey is due to return to Scotland, two-year-old Cynthia Collins dies in a house fire.
Richey is convicted of murder and sentenced to death and an immediate appeal is lodged.
30 JUNE 1987
Richey's first scheduled appointment with the electric chair coincides with the first anniversary of the child's death and a stay is granted.
A direct appeal is lodged with Ohio Supreme Court and denied by four votes to three.
Richey comes within an hour of death before a stay is granted.
An appeal lodged with the same judge who sentenced Richey to death is rejected.
Two witnesses who had claimed they heard Richey threaten to burn down the Ohio flat where Collins died retract their statements.
An appeal is denied by Ohio Supreme Court.
Richey's last scheduled execution date is avoided when a stay is granted and the case is transferred to the federal courts.
31 OCTOBER 2000
New evidence casts fresh doubt on Richey's conviction.
BBC Scotland's Frontline programme uncovers evidence which reveals the fatal fire was probably started by accident.
Meanwhile, leading Liberal Democrat politician Shirley Smith adds her voice to the campaign to free Richey.
4 SEPTEMBER 2002
Hollywood actress Susan Sarandon calls for a retrial for Richey.
She makes the appeal following an approach at the Edinburgh Festival by a group campaigning to free him.
3 MAY 2003
Human rights group Amnesty International says it will attend one of the final appeals available to Richey, on 7 May.
The organisation, which campaigns for the abolition of the death penalty, says it is especially concerned at Richey's conviction, describing it as "one of the most compelling cases of innocence human rights campaigners have ever seen".
The group draws attention to questions about the fairness of Richey's trial and the safeness of his conviction.
6 MAY 2003
On the eve of his appeal, Richey says he would rather die than admit guilt.
Preparing himself for the possibility of death by lethal injection, he says: "Whether they kill me or set me free, I just want it to be over."
7 MAY 2003
Richey's lawyers prepare to present fresh scientific evidence in court, which they say proves his innocence.
His lawyer Ken Parsigian says the appeal is the "one real chance" to convince a court that it was time to let Richey go.
27 JANUARY 2004
As Richey begins his 18th year on death row, he says he is being driven "crazy" by the tortuous wait to be put to death in the US.
As he waits for a decision on his appeal to come through, he says: "It's constantly on my mind. Every morning I think 'maybe today I'll hear something'."
11 FEBRUARY 2004
UK Prime Minister Tony Blair reveals that a decision on Richey's appeal will be made "soon".
Speaking in the House of Commons, Mr Blair says the Foreign Office is closely monitoring the case, as Liberal Democrat MP Alistair Carmichael asks Mr Blair to make direct representations to the governor of Ohio.
25 APRIL 2004
Richey wins a late appeal which could save him from a death sentence, after federal judges refer the case to the US state's Supreme Court to find out if his murder conviction is safe.
The move comes after Ohio's federal appeals court for the US Sixth Circuit sent Richey's case back to be reviewed by judges at the state's Supreme Court.
The judges suggest Richey's conviction for capital murder might be unsafe and, if so, he should be re-tried or released.
14 JULY 2004
More than 200 MPs and MSPs register their support for Richey at the US Sixth Circuit Federal Court of Appeal.
They submit an Amicus Curiae Brief to the court, a legal document filed by individuals who are not party to the case but who believe that the court's decision may be affected by their interest.
It comes from a Latin term meaning "friend of the court".
3 AUGUST 2004
Human rights campaigners mark Richey's 40th birthday by taking a cake to the American consulate in Edinburgh.
Cecile Shea, the US Consul General to Scotland, says she has followed Richey's case closely, but insists his fate rests with the American courts, rather than government.
However, she does promise to get birthday cards to Richey in Ohio.
25 JANUARY 2005
A federal appeals court in Ohio rejects Richey's conviction and death sentence.
The Sixth US Circuit Court of Appeals rules that he must be retried within 90 days, or set free.
In a ruling, three appeal court judges state: "Because constitutional errors have undermined our confidence in the reliability of Richey's conviction and sentence, we reverse the decision."
26 JANUARY 2005
US prosecutors say they are "disappointed" by the decision to quash Richey's conviction.
Kim Norris, spokeswoman for the state Attorney General's Office, says four separate courts had found there was sufficient evidence to convict Richey of the "terrible crime".
30 JANUARY 2005
Richey, who remains in an Ohio prison, says he feels "incredibly bitter" about his time in jail.
Less than a week after winning his appeal, he says: "Rage and anger seethe through my blood."
8 FEBRUARY 2005
US prosecutors lodge a challenge against the appeal court decision which quashed Richey's conviction.
Ohio Attorney General Jim Petro files a state motion to rehear Richey's case and asks for an extra 14 days to prepare its challenge.
13 FEBRUARY 2005
Sister Helen Prejean, the nun who inspired the acclaimed Hollywood movie Dead Man Walking, says Richey should be set free.
She also claims that he should be recompensed for his 18 years in prison.
22 FEBRUARY 2005
Prosecutors file their request for an entire 12-judge appeal court to reconsider its decision.
18 APRIL 2005
Richey is told an Appeal Court decision to quash his conviction cannot be set aside.
The ruling means he must now be retried within 90 days or set free from death row.
Ohio prosecutors want the appeal to be reheard but the Sixth Circuit Court of Appeals in Cincinnati refuses.
19 APRIL 2005
Ken Parsigian says he is confident that Richey will be released in three months' time.
Mr Parsigian says he thinks a retrial is very unlikely.
22 APRIL 2005
Prosecutors announce that the decision to overturn Richey's conviction will be appealed to the US Supreme Court.
Mr Petro files a "stay" with the Sixth Circuit Court of Criminal Appeals - a move which means Richey cannot be released.
Mr Petro says: "We believe the evidence supports the just conviction of Kenneth Richey."
29 MAY 2005
PR guru Max Clifford says he will represent Richey if and when he is released from Death Row.
Mr Clifford says he was approached by Richey's partner, Karen Torley, who said the couple needed help with the level of public interest on his possible release.
22 JUNE 2005
Prosecutors meet to discuss whether they will retry the case.
As the county prosecutor and representatives of the Ohio Attorney General's office meet to decide whether to proceed or set Richey free, Mr Parsigian remains "cautiously optimistic" that the state will decide that a retrial is not in its best interests.
30 JUNE 2005
Prosecutors announce that Richey will be retried.
Putnam County prosecutor Gary Lammers says: "The evidence supports that Mr Richey set the fire that callously ended this little girl's life."
Mr Parsigian says the prosecution has a "snowball's chance in hell" of securing a conviction a second time around.
15 JULY 2005
Prosecutors lodge an appeal in the US Supreme Court against the decision to overturn Richey's murder conviction.
In their petition, they argue that the Sixth Circuit Court of Appeals exceeded its powers in the case.
28 JULY 2005
Richey will remain on death row until the Supreme Court decides whether or not he will be retried, it is confirmed.
Mr Petro welcomes the Supreme Court decision, saying it was "where we believe he properly belongs for his just conviction and sentence for the murder of two-year-old Cynthia Collins".
28 NOVEMBER 2005
The US Supreme Court overturns a decision to quash Richey's conviction.
The ruling sends the case back to the appeal court for further review of Richey's case.
16 MAY 2006
Scots singing duo The Proclaimers pledge support to the campaign to free Richey.
The pair, from Auchtermuchty in Fife, help highlight Richey's situation at a London charity concert and express a hope to visit him in prison.
31 JULY 2006
Amnesty International raises fears over Richey's health, after he undergoes heart surgery.
The human rights group expresses concerns that uncertainty over the case is contributing to his health problems.
10 AUGUST 2007
Richey has his conviction overturned on appeal for the second time by a US court.
The grounds of appeal were that Richey received inadequate legal representation during his 1987 trial and the court orders that he should be retried or released within 90 days.
Deputy Solicitor General at the Ohio Attorney General's Office, Den Mizer, says they will take some time to assess the options.
27 AUGUST 2007
It emerges that Richey is expected to face a retrial.
Prosecutors are understood to have ruled out appealing against overturning the sentence, as Richey's legal team say they had been preparing for a retrial for two decades.
1 SEPTEMBER 2007
Confirmation comes that Richey will face a retrial.
A local prosecutor discusses the case with relatives of the victim, before deciding that Richey should stand trial again, rather than be released.
Mr Parsigian says the state will find it difficult to prove its case, 21 years after the fatal blaze in Columbus Grove.
18 SEPTEMBER 2007
Richey is moved off death row to another US prison and is in "good spirits", according to his now former fiancee Ms Torley.
Ms Torley says a bail hearing is expected in the next few weeks but Richey is "not getting his hopes up".
2 OCTOBER 2007
A judge rules that Richey can be freed from jail - but sets bail at $10m (£5m).
Richey needs to come up with 10% of the bail figure before he can be released, but his legal team admits his family does not have the money.
19 DECEMBER 2007
Richey looks set to be freed after agreeing a plea bargain.
He will plead no contest to attempted involuntary manslaughter and child endangering, which would see him being sentenced to time already served.
20 DECEMBER 2007
Richey falls ill, missing a court hearing that would have set him free after more than 20 years in prison.
He is rushed to a medical centre suffering from chest pains after, his legal team says, taking a bad reaction to medication he has been on for a pre-existing heart condition.
21 DECEMBER 2007
Richey is returned to jail in Ohio following his heart scare.
His brother, Steve, says tests have revealed that he has about 60% blockage in his heart and will need an operation.
Richey says he wants to undergo the procedure after his release, so as not to delay his return to freedom.
1 JANUARY 2008
Richey is expected to be freed in a week, Mr Parsigan says.
The lawyer says Richey will be allowed to walk free and fly home to Scotland at a court hearing on 7 January.
7 JANUARY 2008
After weeks of uncertainty, a court hearing in Ohio agrees to Richey's release from prison.
People in Scotland who have campaigned on his behalf say he will need help to adjust to normal life.