deathbed conversion
The adoption of a particular religion when one's death is near. A: "I didn't know Rita was Catholic." B: "She wasn't, not until her deathbed conversion." I see a lot of deathbed conversions when I work in the hospital—people seem to need religion especially as they near the end of their lives.
on (one's) deathbed
In the process of or very close to dying. He was on his deathbed when he finally confessed his love for Martha. They're scrambling to give her the contracts to sign on her deathbed, as the deals become null and void if she doesn't sign off on them for any reason.
on one's deathbed
while one is in bed and dying. While he lay on his deathbed, he told his lawyer that he wanted to give all his money to charity.
on (one's) deathbed
Close to death.