Paris (AFP) - Longer schooling seems to be an effective and affordable way to cut the risk of HIV infection in AIDS-endemic countries, according to the results of a study in Botswana published Monday.

Data collected among 7,018 people in Botswana found that an extra year of secondary schooling lowered the risk of HIV infection over the following decade by eight percentage points -- from about 25 to 17 percent.

The southern African country with one of the world's highest HIV rates was an ideal setting for the study as a change in its education system in 1996 led to an average increase of about 10 months in schooling.

This allowed a direct comparison of rates of infection between young adults schooled before and after the change.

"We show... that secondary schooling has a large protective effect against risk of HIV infection in Botswana," said the study published in The Lancet Global Health.

The effects were "particularly large among women", for whom the risk was 12 percentage points lower for every additional year of education.

Socio-economic status is a known factor in HIV risk, but whether or not formal education on its own is protective has been hotly debated by researchers. Previous studies have yielded conflicting answers.

In Botswana, about 22 percent of people aged 15-49 were HIV-positive in 2013, according to the paper.

Study co-author Jan-Walter de Neve of the Harvard TH Chan School of Public Health in Boston, hypothesised that better knowledge about preventing infection may be one effect of longer schooling.

"Additionally, education may expand economic opportunities and reduce women's participation in higher-risk transactional sexual relationships," he said in a statement.

The authors said secondary schooling appeared to be a cost-effective intervention for HIV-endemic countries -- with a high return on investment in the form of healthier and longer-living, economically active adults.