Bolivian President Evo Morales late on Friday fired his minister of mines after a violent conflict between rival groups of miners in an Andean region claimed the lives of 16 people.
Morales replaced minister Walter Villaroel with former labor leader Guillermo Dalence, expressing regret that workers in the industry "have so far not cooperated efficiently."
But the president also warned against what he saw as a conspiracy aimed at undermining his left-wing government.
"After some careful thinking, I have come to the conclusion that there exists an external and internal conspiracy against our democracy, my government and Bolivia," Morales stated.
The dismissal came after rival miners' groups battling for control of South America's biggest tin mine agreed on a truce after violent clashes that left 16 dead and 61 wounded in two days.
Government spokesman Alex Contreras said a "social truce" had been agreed late on Friday.
"The explosions and gunshots have stopped," police commander Isaac Pimentel told reporters.
Until the truce was announced, miners hurled dynamite and fought gunbattles for two days running, killing four people on Friday and throwing up a serious challenge to the left-wing Morales.
The government sent in 700 police to the Huanuni mine complex in a bid to restore order.
It was after a short overnight truce to allow the two sides to collect the bodies that clashes resumed on Friday around the remote mining region, 4,000m up in the Andes and 500km south of La Paz.
Huanuni produces five percent of the world's tin and prices soared on Thursday on world markets because of the violence.
The conflict erupted on Thursday after an estimated 4,000 miners from independent cooperatives demanded access to the giant tin mine.
The two sides threw sticks of dynamite at each other and fired guns across mountain passes, witnesses said.
The independent miners and workers for the state-owned Mines of Bolivia are both linked to Bolivia's president.
And Roberto Chavez, the union leader of the Bolivian Mineworkers Federation, blamed the Morales government for the clashes.
"Now, let them provide the caskets," Chavez said.
Bolivian Vice President Alvaro Garcia Linera lamented that "something that should have been a blessing for the country has been turned into a curse," referring to world tin prices which have multiplied since 2004.
Morales came to power with the promise that he would spread the wealth from the country's rich natural resources. He has forced foreign oil and gas companies to renegotiate contracts but has faced mounting troubles in the mines.
Government officials called the fighting "demented and fratricidal" and called for calm in a statement by presidential spokesman Juan Ramon Quintana.
The independent miners rolled tires loaded with dynamite down slopes to the mine, blowing up mine ventilation equipment.
State workers retaliated by blowing up a housing complex for the independent workers' families.