KAMPALA (Reuters) - Ugandan police released three journalists on Friday who were working for the British Broadcasting Corporation, after detaining them overnight on suspicion of illegally possessing government prescription drugs.

The three -- two Ugandans and a Kenyan -- were among a total of five people arrested in the incident, the others being the wife of a local journalist working with them, and a driver.

Police freed the five after establishing that the three journalists were conducting a legitimate investigation into the illegal sale of government drugs by officials.

“It is clear that their motive was to show how easy it was to buy government drugs,” a police statement said. “We do encourage them to continue with their documentary program and achieve their intended objective of exposing their targets, to help prevent such occurrences in future.”

Police detained the five on Thursday after seizing fourteen boxes of prescription tablets, vaccines and other material.

Uganda’s crippled health sector has frequently been hit by protests over dilapidated government hospitals, the widespread theft of government drugs and poor pay for health workers.

Police said they were working with the public prosecutor to establish whether the journalists broke any laws during their investigations.