Providing prisoners with better health care could prevent outbreaks of HIV and tuberculosis from spilling over into the general population, experts say.

Prisoners typically have higher rates of diseases including AIDS, hepatitis, mental illnesses and tuberculosis. Treating people while they are jailed gives authorities a chance to stop health problems before they hit the public, wrote Seena Fazel of the University of Oxford and Jacques Baillargeon of the University of Texas Medical Branch.

Their review of prisoners' health, drawn mostly from Western countries, was published Friday in the medical journal Lancet.

Worldwide, more than 10 million people are incarcerated, including about 2 million in the U.S.

"Prisoners act as reservoirs of infection and chronic disease, increasing the public health burden of poor communities," wrote Fazel and Baillargeon.

The researchers said when prisoners are released, they often return to their home communities untreated or in a worsened and possibly infectious condition.

They recommended that prisoners' health be overseen by countries' public health systems, not the criminal justice system. They also said prisoners should be screened for illnesses and given treatment before they are released.

The World Health Organization advises governments to provide prisoners with the best possible health care free of charge, even when countries are strapped for cash. A U.N. statement on the treatment of prisoners says they should have access to health services without discrimination.