KAMPALA, Uganda — When she was younger, Tryphena Natukunda’s mother discouraged her from swallowing her antiretroviral medicines among strangers or even distant relatives.

Because the girl had AIDS, which can fuel stigmatization and invite harsh judgment, the mother wanted her daughter’s condition kept a secret within the family.

Yet as she grew older, Natukunda, now 18 and the latest winner of a beauty pageant for young Ugandan women with the virus that causes AIDS, yearned to live openly, even if it meant people saying harsh things behind her back.

Natukunda was crowned Miss Young Positive during a boisterous affair at a Kampala hotel early Sunday, besting nine other contestants in an annual competition organized to enlighten people about the dangers of discriminating against people with AIDS. A similar competition is held for young men.

“If my mother was not with me, I couldn’t go any place where they didn’t know my status,” Natukunda recalled late Saturday, as she had her makeup done backstage before the show. “What we used to fear was people seeing me taking my drugs and then asking, ‘What are those drugs for?'”

It’s a question that haunts other AIDS patients in this East African country, where experts warn that discrimination remains an obstacle to preventing new HIV infections. Many Ugandans still regard an HIV diagnosis as proof of irresponsible sexual behavior and a source of shame.

Mothers suffering from AIDS have been known to breastfeed their infants in public places, exposing their children to HIV because they don’t want a bottle and formula to make others suspect they are infected.

Organizers of the HIV-themed beauty pageant, which launched in 2014, say one way of curbing the irrational fear of AIDS that fuels discrimination is for more people living with HIV to open up about their status rather than conceal it.

“In Uganda, many young people die not because they do not take their medicine. It’s just because the stigma and discrimination around them hindered them from taking their medicine well,” Lovinka Nakayiza of the Uganda Network of Young people Living with HIV & AIDS, the civic group which put on the pageant, said. “Our family members discriminate against us because they think HIV moves on our faces when we touch their cups, when we talk to them.”

Whoever wins the pageant is expected to become a roving ambassador in the fight against AIDS, Nakayiza said. Instead of physical attributes or special talents, contestants were judged on their knowledge of HIV, including basic questions such as the term for which HIV serves as an acronym.

The Ugandan government has been campaigning to persuade more people to get tested for HIV, since experts believe those who know their status are more likely to abstain from risky sexual behavior. The HIV prevalence rate in Uganda stood at 7.1 percent in 2015 among adults aged 15 to 49, according to the Joint United Nations Programme on HIV/AIDS.

In 2005 the prevalence rate was 6.4 percent, down from the double-digit figures in the 1990s that inspired behavior-change campaigns for which Uganda was known globally. However, tens of thousands still get infected with the virus each year.

Nakayiza said the beauty pageant was inspired by a desire to do something new in the AIDS prevention movement, which she said was dominated by “too many workshops” that can bore instead of motivate young people.

Robinah Babirye, a 23-year-old who won the Miss Young Positive title in 2015, has spent the last year speaking at schools and other public places where young people living with HIV need encouragement.

Babirye, who went through “rough” times of her own when long-time friends shunned her, said connecting with others in the same situation has been good for her and for them.

“Most of the young people that I have met have seen me as an inspiration, have seen me as an example, and that I am proud of,” she said. “Through talking and relating with young people living with HIV, I have empowered young people and made them positive about life.”