BOSTON –— As a gay man, the Boston attorney thought he was doing the responsible thing when he asked his doctor to prescribe Truvada, a drug hailed as a way to halt the spread of AIDS. But when he tried to get long-term care insurance, Mutual of Omaha turned him down, saying they do not offer coverage to anyone who takes it.

Now, the man is planning to sue the insurer, alleging he was discriminated against because he is gay. He filed a complaint Wednesday with the Massachusetts Commission Against Discrimination, the first step in a lawsuit.

The man, who is identified only as John Doe in the complaint, said he wants to make sure that he and anyone else taking Truvada can get long-term care insurance, which covers daily, extended-care services for people with chronic illnesses or disabilities.

He also wants to ensure that people are not deterred from using Truvada because they fear they will face discrimination.

“I was shocked. I really was,” Doe told The Associated Press in interview at the offices of Gay & Lesbian Advocates & Defenders, a Boston-based legal group who is representing him. He spoke on condition of anonymity because his complaint contains private medical information.

“I thought maybe they misunderstood me. I’m HIV-negative. I’m not HIV-positive. I was taking Truvada as a prophylactic.”

Bennett Klein, director of GLAD’s AIDS Law Project, calls the decision “nonsensical.”

“It’s really based on the stereotypes and the fears that are out there, that somehow gay male sexuality is inherently risky and unhealthy. We have a lot of bias about gay male sexuality in our society,” Klein said.

Truvada was first approved by the U.S. Food and Drug Administration in 2004 to be used in combination with other medications to treat people with HIV. In 2012, the FDA made it the first drug approved for pre-exposure prophylaxis (PrEP) to reduce the risk of HIV infection in uninfected people.

The Centers for Disease Control and Prevention says taking Truvada consistently has been shown to reduce the risk of HIV transmission in people who are at risk by up to 92 percent.

Critics of Truvada say widespread use could lead to an increase in condomless sex and new HIV infections because people will forget to take the pill it every day.