James Washington almost got away with murder, WSMV reported.

The Nashville man was on his deathbed when he confessed to murder, and then tried to take it back when he realized he wasn’t going to die.

Washington was in prison for an unrelated charge when he suffered a heart attack. That’s when he admitted to the murder of Joyce Goodener on July 5, 1995, according to WSMV. He stabbed Goodener, lit her on fire and beat her to death with a gray cinder block.

At the time of his confession, Washington didn’t think he would live to have to face the consequences, but it turns out he did.

Prison guard James Tomlinson revealed Washington's confession in court.

"He kind of got as best as he could, motioned, and said, 'I have something to tell you. I have to get something off my conscience and you need to hear this.' He said, 'I killed somebody. I beat her to death,'" Tomlinson told the jury.

The victim's daughter couldn’t believe that the murderer of her mother had confessed.

"I didn't have any trust in the system. All of a sudden, I got this phone call and they said, 'We think we found him,'" Goodener's daughter, Sonya Kimbrell, told WSMV.

Astonishingly, Washington wanted to take back his statement after surviving the heart attack, but it was already too late. He had been found guilty a month ago and now faces a life sentence, the Global Dispatch reported.

Washington isn’t the only murderer to confess on his deathbed, the Huffington Post reported that he joines the likes of Gerladine Kelly and Henry Alexander, but unlike Washington, they died soon after their confessions were made.

Washington was found guilty of murder in the first degree and will spend the rest of his life in jail.