Hillary Clinton told a man who was wrongly convicted of murder and spent almost four decades on death row that she was still in favour of the death penalty.

In the run-up to primaries in five states on 15 March, Ms Clinton said she was “struggling” with the concept of the death penalty but that it should still be applied for “horrific mass killings” under the federal, not the state, system.

The Democrat was asked a question on the subject by exonerated man Ricky Jackson, who “came perilously close to [his] own execution.” Mr Jackson was convicted at 18 years old for killing a salesman in Cleveland, Ohio in 1975. The key witness was 12 years old at the time and later recanted in court, as reported by CNN.

“In light of what I just shared with you and in light of the fact that there are documented cases of innocent people who have been executed in our country, I would like to know how you can still take your stance on the death penalty in light of what you know right now?” he asked.

Ms Clinton, speaking at a town hall event Sunday at Ohio State University, replied that capital punishment was a “profoundly difficult question”.

“The states have proven themselves incapable of carrying out fair trials that give any defendant all the rights they should have and the support that the defendants’ lawyers should have, and I’ve said I would breathe a sigh of relief either if the Supreme Court or the states themselves began to eliminate the death penalty,” she said.

She pointed to so-called terrorist activities like the bombing of the government building in Oklahoma City in 1995, which killed 168 people, including children enrolled in the pre-school, as an example of a crime which should be punished by death.

Since Oklahoma bomber Timothy McVeigh was executed in 2001, the federal government has put to death two more men: Juan Raul Garza in 2001 and Louis Jones Jr. in 2003, and neither were involved in terrorism, according to LA Times. The only person on federal death row convicted of terrorism killings is the surviving Boston bomber Dzhokhar Tsarnaev.

Ms Clinton said she would advocate “a very limited use of [capital punishment]” and only for ”limited cases where there have been horrific mass killings.”

“That’s the exception that I really am struggling with and [it] would only be in the federal system, but what happened to you [Ricky Jackson] was a travesty,” she said. Mr Jackson was released from prison in 2014 after almost 40 years behind bars.

The Democrat first came out in favour of the death penalty in October last year during a presidential campaign stop in New Hampshire.

Ms Clinton’s stance on the death penalty is contrary to her rival Bernie Sanders, who has advocated the complete abolition of the sentencing.

He said in February that he did not want "to see government be part of killing”, noting how the sentencing was applied discriminately.