The Guatemalan government has declared a state of siege in the town of Santa Cruz Barillas following clashes over the death of a community leader.
Residents briefly took control of a military outpost on Tuesday, hours after discovering the body of a local resident who had opposed the construction of a hydroelectric dam.
More than 200 troops and police officers have been sent to the area.
At least eight people have been detained.
Army spokesman Rony Urizar said some 200 residents armed with machetes and guns attacked the local barracks in Huehuetenango province.
He said they beat up several soldiers and set buildings ablaze.
President Otto Perez Molina said the situation in the area was now under control, but the state of siege would be in place for 30 days.
Mr Perez Molina, a retired army general, said the attack was a provocation against the armed forces.
He said that those who took part in the riot could be linked to drug traffickers based in the scarcely policed region, near the Mexican border.
But a resident of Barillas told the AP news agency that they were demanding justice for the killing of an indigenous leader, Andres Francisco Miguel.
His body with bullet wounds was found on Tuesday night.
Hours after the discovery, protesters marched on the local barracks.
Residents believe Mr Miguel was killed for opposing to the construction of the hydroelectric plant.
"We received several reports of harassment in Huehuetenango allegedly connected to the hydroelectric plant," said Alberto Brunori, the representative of the UN High Commissioner for Human Rights in Guatemala.
"But those are reports that have to be investigated," he told AP.