An HIV positive shop owner displays the pills that he takes daily to battle his illness. (Amy Sancetta/AP)

Thousands of people 50 and older are diagnosed with HIV each year in the United States, a development that has significant consequences for the health care and social support they need and the doctors, counselors and others who provide it.

Older people tend to be sicker when the infection is finally discovered. They usually have other health conditions that accompany aging and often are too embarrassed to reveal their illness to family and friends.

Many never dreamed they were at risk of contracting the virus, and some have outmoded ideas of a disease that long ago became manageable through advances in medication.

“I said, ‘Well, I guess that’s a death sentence,’ ” a Maryland man recalled of his diagnosis at the age of 73. “And the fellow who told me said: ‘No, it’s not. It’s not like that anymore. Once you get on medication, you’ll probably die of whatever old-age thing you’re going to die of anyway.’”

Yet health-care providers still don’t routinely consider HIV when treating older patients, despite guidelines that call on them to screen through age 64, researchers and physicians say. They may be reluctant to ask about an older person’s sex life and sometimes attribute HIV symptoms to age-related issues such as heart disease.

Amy C. Justice, a researcher at Yale University’s Center for Interdisciplinary Research on AIDS, recalled a married man in his 60s who was seen by specialists at Yale-New Haven Hospital. It took more than 18 months before anyone thought to test him for HIV, despite symptoms consistent with the disease.

In 2014, nearly 17 percent of the country’s new HIV diagnoses — 7,391 of 44,071 — were among people 50 and older, according to the Centers for Disease Control and Prevention. That was down slightly from 2013 but up from 15.4 percent in 2005, when data were less complete.

In a study two years ago, the age group represented more than 1 in 5 of newly diagnosed patients at a New York City medical center.

The phenomenon has various medical and social roots. Erectile dysfunction drugs such as Viagra, for example, have extended men’s sex lives. And older heterosexuals, particularly women beyond child-bearing years, may not be in the habit of using condoms for safe sex. The advocacy organization ACRIA is trying to educate them about protected sex through a campaign called “Age Is Not a Condom.”

Overall, this graying population has not been studied much — especially compared with people who acquired HIV when they were younger and have been aging for decades with the infection, aided by improved antiretroviral therapy.

While the older newly diagnosed group includes more heterosexuals and more women, it generally reflects the overall HIV universe: mostly gay men, some straight men and women, intravenous drug users. It is mostly minority, as well.

A big difference for older people, however, is the shock of receiving an HIV diagnosis later in life. That is especially true for heterosexuals, mostly women, who thought they were in monogamous relationships and must confront the idea that a partner likely has been having sex with someone else.

“Deer in the headlights,” said Ellen A.B. Morrison, a researcher at Columbia University’s Mailman School of Public Health, in describing the women with whom she has worked. They are predominantly African American or Latino.

“They’re just completely caught off guard,” Morrison said. “These are not people who ever thought themselves at risk. They do not understand their partner’s behavior. They know nothing about HIV. They don’t know anyone who has it. They don’t know who to turn to for questions. And they are terribly embarrassed.”

The Maryland man, a 76-year-old widower who said he was occasionally bisexual during his marriage and continues to be, knew he was putting himself at risk through some of his sexual practices. Still, he was stunned when he was diagnosed in 2013.

“That kind of floored me. Damn. That old, and all of a sudden you get hit with it,” he said. He agreed to be interviewed if granted anonymity to protect his privacy.

He still hasn’t told anyone but the members of a peer support group. “In some ways I would like to tell my kids; I don’t feel like they need the extra worry in their life. I don’t see any extra positive other than the freedom of not trying to hide it,” he said.

Older people who feel stigmatized worry that family, friends, neighbors or caregivers will shun them at a time when they often have a heightened need for social support, especially if a spouse or partner has died, some experts said.

The diagnosis and social isolation can lead to depression, studies show. That can cause people to stop taking their medication, said Stephen Karpiak, director of research and evaluation at ACRIA, which is based in New York City.

“The best predictor of not taking your pill . . . is depression,” he said. Newly diagnosed older people have to “take a pill for a disease that is hated,” and that will affect the rest of their lives. “And they’re entering aging, which is scary for everyone.”

But a 2015 study of HIV-positive women older than 50 found that many eventually transition from shock, disbelief and a sense of doom to growing acceptance. The diagnosis also prompted them to take better care of their physical and mental health, to leave toxic situations and to engage in more meaningful activities, wrote Christina Psaros, a Harvard Medical School psychologist.

“With age came knowledge and understanding of what it means to live with HIV and how to . . . cope effectively,” she wrote in the journal Aging and Mental Health.

Medically, newly diagnosed older people may immediately face the prospect of a high viral load and more severe illness if their infection is not recent. Older immune systems are not as robust and do not respond as well. A greater proportion of older people die within a year of diagnosis than younger people do.

And because HIV is an inflammatory condition, it increases the likelihood of heart attacks and strokes. Older people already are more likely to be managing high blood pressure, high cholesterol and diabetes, so their doctors must be careful about which antiretroviral drugs to prescribe. For example, some do not react well with statins taken for high cholesterol, said Raymond Martins, senior director of clinical education and training at the Whitman-Walker Health clinic in Washington.

Alfred Newton of San Francisco said he practiced unprotected gay sex and took illicit drugs all his life — until shortly before his HIV diagnosis last year at 72.

By then, he already had many infirmities of age, including high cholesterol and mild chronic obstructive pulmonary disease. He had had hip replacement surgery, plus two other operations on that joint, as well as prostate surgery. When he got over the shock of hearing he had HIV, he began to view it as another condition of his advancing years. He has no symptoms and a very low viral load, he said.

“It’s just another add-on to everything else,” Newton said.

If there is a silver lining for older people with HIV, it is how serious they become about protecting their health. Like the women in the Harvard study, both Newton and the man in Maryland swore off unhealthful habits as they began managing their HIV. Older people are much more adherent to drug regimens than younger ones, Martins noted. Both men with HIV said they’ve missed barely a day of taking their medication.

“In a lot of ways, being [HIV] positive has been a positive experience,” the Maryland man said. “Healthwise, I feel like I’m really in pretty good health. I’m more aware of my health.”

Contrasting his condition to the diabetes that afflicts many people his age, he added. “I’d much rather take two pills a day than have to do blood tests and take insulin shots.”