Uganda’s president was tested for HIV in public on Friday to encourage millions of untested people to check their status, a critical step in stemming the spread of the virus in the East African country.

Political leaders rarely get tested for HIV in public in Uganda, despite recommendations from health workers that it would set a good example in a country that has seen HIV infection rates increasing. Uganda was once a global leader in efforts to fight AIDS.

Not all government officials at the Friday event in the capital, Kampala, joined the president in getting tested.

Ugandan officials have said they want to test 15 million people by the end of 2014. They acknowledge it will be hard to reach that target, saying that is why they want the president to be a role model.

“Therefore, all Ugandans, test,” President Yoweri Museveni said Friday. “Find out your status, and let the state and health workers manage you accordingly.”

The HIV rate in Uganda stands at 7.3 percent, up from 6.4 percent in 2005, according to a 2011 survey by the country’s Health Ministry. Ugandan officials who presided over its decline from 18 percent in 1992 to 6.4 percent in 2005 say they are confounded by the increase.

Ugandan health officials say more married couples are getting infected, in part because of what campaigners have dubbed a “sexual network” in which married Ugandans maintain secret lovers. One billboard in Kampala urges couples to “put your love to the test” by getting tested for HIV.

Museveni and his wife are “leading by example in a bid to roll back the HIV epidemic in Uganda,” the Uganda AIDS Commission said, though the first lady did not attend Friday’s event.

Experts say HIV testing is critical to preventing new infections because those who know their status are less likely to engage in risky sexual behavior. But encouraging people to get tested has proved difficult in Uganda, where stigma about the disease persists.

The rise in new infections is stretching the ability of Uganda’s government and donors to provide HIV and AIDS treatment. More than 500,000 Ugandans need AIDS treatment, many accessing it through the U.S. President’s Emergency Plan for AIDS Relief, or PEPFAR.

If Ugandans reach their testing goal, at least 400,000 more people will probably need treatment, according to Musa Bungudu, the Uganda coordinator for the U.N. AIDS agency.

— Associated Press