The first federal president, Manuel José Arce of El Salvador, resigns in 1827 after only two years in office. Civil war breaks out between the liberals and conservatives. By 1827 Guatemalan conservatives have seized control of the government, but in 1829 liberal forces commanded by Honduran General Francisco Morazán take Guatemala City. Under Morazán's presidency (1830-1840) the federation launches liberal reforms. Rafael Carrera leads the Guatemalan peasants in a successful guerrilla war. He holds staunch conservative views, supporting the church and advocating states' rights against federal authority. When the federation begins to disintegrate, he defeats Morazán in 1840, effectively ending the United Provinces.
When the federation is dissolved in 1840, Guatemala, from 1847 the Republic of Guatemala, becomes independent. Guatemala is ruled by a small landowning oligarchy, ruled until his death in 1865 by Carrera. After Carrera's death the liberals seize power in 1871, bringing Justo Rufino Barrios to be the dictator. Barrios tries to unificate the Central-American countries, which leads to a war. He is defeated and killed in this war and succeeded by fellow liberals Manuel Lisandro Barillas (1885-1892) and José Reina Barrios (1892-1898). From 1898 until 1920 Guatamala is ruled by the 'liberal' dictator Manuel José Estrada Cabrera. Starting with his rule Guatemala is dominated by American corporations such as the United Fruit Company. Guatemala is called the "banana republic." The rule of the PL continues with José María Orellana Pinto (1921-1926) and Lázaro Chacón González (1926-1931). From 1931 until 1944 Guatemala is ruled by another 'liberal'dictator, Jorge Ubico Castaneda. In 1944 left-wing army officers seize power and a periode of progressive presidents like Juan José Areval (1945-1951) and Jacoba Arbenz (1951-1954), both member of the Partido Revolucionario de la Acción (Revolutionary Action Party, PAR), starts.
With the support of the United Fruit Company a new military coup succeeds in 1954. Arbenz is succeeded by the dictator Carlos Castillo Armas. This leads to military repression and left-wing guerilla resistance. Between 1958 and 1963 Miguel Ramon Ydígoras Fentes is president, succeeded in 1963 by Enrique Peralta Azurdia. In response to the increasingly autocratic rule of Ydigoras Fuentes of the National Redemption Party (PRN), who takes power in 1958, a group of junior military officers revolt in 1960. This revolt fails, but the group is the nucleus of the forces that are in armed insurrection against the government for the next 36 years. Ydígoras Fentes is succeeded in 1963 by the military Enrique Peralta Azurdia. Shortly after Julio César Méndez Montenegro of the conservative Revolucionario Partido (Revolutionary Party, PR) becomes president in 1966, the army launches a major counterinsurgency campaign that largely breaks up the guerrilla movement in the countryside. Méndez Montenegro is succeeded in 1970 by Carlos Manuel Araña Osorio of the authoritairan Movimiento Nacional de la Liberación (National Liberation Movement, MLN), 1974 by Kjell Eugenio Laugerud-García (also MLN) and in 1978 by Fernando Romeo Lucas García of the authoritarian Partido Democrático Institucional (Democratic Institutional Party, PID).
In 1982 the army stages a new coup and Ríos Montt becomes president. He forms a three-member military junta that annulls the 1965 constitution, dissolves parliament, suspends political parties, and cancels the electoral law. After a few months, Rios Montt dismisses his junta colleagues and becomes president. Rios Montt's brief presidency is probably the most violent period of the 36-year internal conflict, which results in about 200,000 deaths of mostly unarmed indigenous civilians. In 1983 Rios Montt is deposed by Oscar Humberto Mejia Victores, who succeeds him as de facto president of Guatemala. Mejia allows a managed return to democracy in Guatemala, starting with elections in 1984 for a Constituent Assembly.
The elections of 1985 are won by Vinicio Cerezo of the Partido Democracia Cristiana Guatemalteco (Guatemalan Christian Democratic Party, PDCG). He takes office in 1986. He announces that its top priorities would be to end the political violence and establish the rule of law. The first 2 years of Cerezo's administration are characterized by a stable economy and a marked decrease in political violence. The final 2 years of Cerezo's government are marked by a failing economy, strikes, protest marches, and allegations of widespread corruption. In 1990 Jorge Serrano of the MAS wins the presidential elections and after he is inaugurated in 1991 he forms a coalition with the PDCG and the liberal Unión del Centro Nacional (UCN). In 1993 Serrano dissolves Congress. His autogolpe (or self-initiated coup) fails. Serrano fleas the country and parliament elects Ramiro De Leon Carpio as interim-president. In 1994 a new parliament is elected, dominated by the populist Frente Republicano Guatemalteco (Republic Guatemalan Front, FRG) and the center-right Partido de Avanzade Nacional (National Progress Party, PAN). In 1996 Alvaro Arzu of the PAN is elected president. Under his administration, peace negotiations are concluded and the government signs peace accords ending the 36-year internal conflict in December 1996. The 1999 elections bring Alfonso Portillo (FRG) to power. The FRG is defeated at the 2003 elections and this brings in 2004 Óscar José Rafael Berger Perdomo of the Gran Alianza Nacional (Grand National Alliance, GANA) into the presidency.