An attempted robbery at a bank in northern Guatemala led to the fatal shooting of a security guard and the deaths of two of the assailants at the hands of a lynch mob, authorities said Friday.

The events unfolded Thursday night in Cubilguitz, a mainly indigenous village on the outskirts of Coban, 290 kilometers (180 miles) north of this capital, a police spokesman said.

Four armed men tried to rob a bank branch, but were repelled by private security guards.

One of the guards, identified as Enrique Maquin, 42, was killed in the gunfight, while one of his colleagues and an assailant were wounded.

As news of the attempted robbery spread, hundreds of residents gathered outside the bank and snatched the wounded assailant away from police.

The crowd beat 23-year-old Israel Caal until he gave up the names of his accomplices, while a separate mob captured another of the would-be robbers, Juan Gutierrez, 27, as he was fleeing in the direction of Coban.

"The residents brought the two alleged criminals to the center of the village, where they beat them and burned them alive, without the agents' being able to intervene," the police spokesman said.

Vigilante justice as a widespread phenomenon in Guatemala dates from the 1996 signing of peace accords that ended the country's 36-year civil war.

Eleven people died in around 180 lynchings in 2012, according to figures kept by the national ombud's office.

Lynchings are up 38.5 percent so far in 2013 compared with last year, the independent Mutual Support Group says.

The absence of police in isolated communities and pervasive distrust of the judicial system are the main reasons for the rising number of lynchings in the Central American nation, analysts say.