William J. Hager, 86, said he had run out of options.

His wife, Carolyn Hager, 78, had been ill for the last 15 of the more than 50 years they were married. The cost of her medications had become so burdensome that they could no longer afford it, he said. So on Monday morning while she was sleeping, he shot her in the head, he told the deputy who came to their Florida home.

The killing in Port St. Lucie and Mr. Hager’s explanation were detailed in an arrest affidavit and by local news media. Mr. Hager was arrested and charged with first-degree premeditated murder. But the case appeared to also highlight the difficulties faced by older people who are retired or on fixed incomes and struggle to pay for their medicine when they are ill or in pain.

At the sheriff’s office, Mr. Hager told deputies that his wife had a “lot of illnesses and other ailments which required numerous medications,” which he “could no longer afford,” the affidavit said.

According to a study by the AARP, an advocacy group for people over 50, specialty drugs that treat complex, chronic conditions such as Parkinson’s disease and rheumatoid arthritis come with huge price tags.