Kenneth Richey smiles after being released from the Putnam County jail in Ottawa, Ohio, January 7, 2008. Richey is due to return to UK on Tuesday. REUTERS/Dave Zapotosky/The Blade/Handout

CHICAGO (Reuters) - A British man who came close to being executed by the state of Ohio for killing a 2-year-old girl was set free under a plea deal on Monday, with plans to return to his home in Scotland, authorities said.

Kenneth Richey, 43, had his sentence reduced to time served since being sent to death row for setting a 1986 fire that killed Cynthia Collins, a Putnam County court official said.

Richey had been asked by the toddler’s mother to look after the girl while she went out after a night of heavy drinking and marijuana smoking in their Columbus Grove, Ohio, apartment house.

Richey denied setting the fire and the controversial case became a cause celebre across Europe, which does not have capital punishment.

He was readied for execution in 1994 but was granted a last-minute stay.

An appeals court overturned his conviction in August, saying Richey received inadequate legal representation amid several doubtful pieces of evidence.

Richey agreed to plead no contest to attempted involuntary manslaughter, child endangering and breaking and entering, giving him his freedom but with the stipulation that he leave the United States. In pleading no contest, the defendant concedes the charges alleged without admitting guilt.

Originally, prosecutors said Richey had set the fire to get back at a former girlfriend who was asleep with another man in the apartment below.

Richey was supposed to have been freed three weeks ago in time to spend Christmas with his mother in Edinburgh, but his hearing was delayed when he suffered heart problems.