At least two people have been killed after a detonation at a military barracks in Bolivia, but officials warn the death toll could rise.

Bolivian Defence Minister Ernesto Justiniano said that around 81 people were injured when "pyrotechnic material" detonated at an artillery regiment’s base in Viacha, approximately 30 kilometres south of La Paz, around 14:30 local time. Seven others remain missing.

Health official Rita Nebraska reported that local television sources indicated between ten and fifteen people had died. Police said dozens of nearby homes were damaged and emergency responders were searching the rubble.

Officials warned of a possible secondary explosion and urged residents to stay at least 150 metres from the military base. The incident prompted Viacha authorities to declare three days of mourning.

President Rodrigo Paz expressed his "deepest solidarity" with the families of those who died or were injured, and pledged a thorough, technical and transparent investigation into the cause of the blast.

Police spokesman Roger Roca confirmed that fireworks were stored at the barracks; the exact cause of the detonation remains under investigation.

People run for shelter after explosion at Bolivia military barracks