The Totonicapán Uprising of 1820 was an uprising of indigenous Maya peoples (K'iche') against the Spanish Empire that occurred in Totonicapán, located in the western highlands of Guatemala. The revolt was in response to the excessive tribute demanded by the colonial authorities, and managed to establish a short lived breakaway state in Totonicapán with a free indigenous government. The rebellion was concurrent with the independence of Central America and other Latin American wars of independence.
Background.
Much of the colonial economy of New Spain was dependent on the exploitation of indigenous land and labor by the criollo and Spanish elite, this was especially true in colonial Guatemala where native Mayans and other indigenous people were imposed heavy tributes. In response to the heavy burden the natives faced, and seeking to create legitimacy for their new government, the Cadiz Constitution of 1812 was enacted by Napoleonic Spain which abolished these tributes as well as extending suffrage to all indigenous Americans living in the Spanish colonies. This constitution would be short lived however, and after the fall of Napoleonic Spain and reinstatement of King Ferdinand VII into power, the Cadiz Constitution would be abolished in 1814 along with all the agreements the constitution enacted. The constitution would be enacted again in 1820 due to mutinous efforts by the Spanish general Rafael del Riego. Though restored, the colonial authorities in Guatemala refused to enact it and continued to demand tribute from the indigenous. The Indigenous People of Totonicápan became aware of this and refused to make any payments. This refusal would lead to further unrest in the region.
Rebellion.
As a response to colonial demands for tribute and its refusal to enact the newly reinstated constitution, K'iche towns in Totonicapán rose up in opposition to the colonial government. The rebellion would begin by popular leaders organizing protests in the central plaza of Totonicapán and causing the mayor of that town to flee in fear of his life. Under the leadership of Atanasio Tzul, who according to popular legend, was declared king. A small struggle would ensue against the royal authorities in Guatemala. An autonomous state with a proper indigenous government was established in Totonicapán and lasted for 20 days. 
The rebellion would later be put down by a "ladino" militia of approximately one thousand men from Quetzaltenango, Salcajá and San Carlos Sija. This force was led by the Spanish "Corregidor" of that region, Prudencio Cózar, who was tasked and authorized to use military force to extract payment. A series of small skirmishes occurred between both sides but Tzul's poorly trained Indian troops would prove an ineffective force against Cózar's army. The conflict would be short lived and Tzul, along with other indigenous leaders, would surrender and later be imprisoned. Tzul and other leaders would be pardoned the following year due to the inability of the state to process any charges of sedition against the Spanish government, due to the ongoing independence movement .