A 74-year-old sex offender who had been on death row for more than 40 years for the killing of a woman he had raped died while awaiting execution, corrections officials said Wednesday.

Harvey Heishman died in San Quentin State Prison’s infirmary on Tuesday, according to the California Department of Corrections and Rehabilitation.

WISCONSIN SEX TRAFFICKERS DEATH UNDER INVESTIGATION AFTER 17-YEAR-OLD GIRL KILLS HIM

His cause of death will be determined by the Marin County coroner, they said.

Harvey Heishman

Harvey Heishman died at 74 while awaiting execution in a California prison. (CDCR via AP)

Heishman was sentenced to death in Alameda County for the November 1979 killing of 28-year-old Nancy Lugassy, who was shot to death outside her Oakland home.

DISNEY RESORT ALLEGED RAPE: FLORIDA MAN SEEN ON SECURITY CAMERA FORCING HIMSELF ON WOMAN BY HOTEL BAR: POLICE

Lugassy told police Heishman had raped her on the night they met. Police arrested Heishman but he was released on bail. He shot Lugassy to death before she was scheduled to testify against him, according to authorities.