Let's say you're a young person, around 30 years old. And you're the kind of person who likes to take risks. So maybe you're taking risks in your sexual relationships. You're not practicing safe sex.

What would make you change your behavior?

That's a question that's long been pondered by public health officials. And now new research from a World Bank-funded team in Lesotho, a tiny country in southern Africa, has produced a surprising answer.

Lottery tickets!

Here's what happened.

Researchers wanted to see if they could reach individuals who are prone to taking risks in Lesotho, a country with very high rates of HIV infection. Forty percent of people between the ages of 30 and 34 are HIV-positive.

The researchers recruited 3,427 volunteers in 29 villages. One group would come back every four months to be tested for two sexually transmitted infections that are curable. Volunteers were given small gifts to come back every four months.

Another group also came back for a test every four months, but these people didn't get a promise of a small stipend. They each got a lottery ticket. And there would be a drawing every four months. Two men and two women in each participating village would get a $50 prize. That's a lot of money in Lesotho.

What the researchers found was extraordinary. After two years, there was a 21.4 percent reduction in HIV infections in the lottery ticket group compared with the volunteers who got the small gifts.

"A 21.4 percent reduction in HIV incidence is a very large reduction," says researcher Martina Bjorkman Nyqvist, who ran the study. In previous trials to change behavior regarding HIV risks, there's never been "significant reduction in HIV incidence," she says.

The researchers also identified the people in the study who liked taking risks. They had volunteers play a game to establish which of them liked gambling. And in that subset of risk-loving individuals who got lottery tickets instead of gifts, the reduction in HIV infection was about 60 percent, Nyqvist reports.

(In case you were wondering why the volunteers were not tested for HIV, it's because the study didn't want to eliminate participants who were already HIV-positive. Getting them to practice safe sex is critical to keeping rates of infection down.)

It's too soon to roll this out in a big way. The study needs to be replicated.

And you'd need money — not for the lottery tickets but more for the cost of the STD tests that need to be administered to all participants.

But Nyqvist has a clever idea for cutting the need for testing: Just get everyone who's participating a lottery ticket and tell the participants that if they win, they get the cash only if they test negative for HIV.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.