Nicaragua emerged as a democracy following centuries of autocratic rule, beginning with the era of Spanish colonialism during the 16th Century. While Nicaragua finally achieved independence from Spain in 1821, it would be more than 100 years before democracy was instituted. Mexico and then the United States dominated it for many years. Intermittent periods of independence and self-rule were invariably interrupted by foreign intrusions. U.S. military occupation from 1912 to 1933, imposed to protect U.S. companies' interests there, gave way to the dicatorial rule of the Somoza family, who ruled until the son of the dynasty's founder, Anastasio Somoza Debayle, was overthrown in 1979.
Rather than install a democratic form of govenment, Nicaragua's new rulers, the leaders of the guerrilla movement that overthrew Somoza, formed a dictatorship based upon Marxist-Leninist principles. This movement, the FSLN, or Sandinistas -- named for the Nicaraguan revolutionary killed by the Somozas, Augusto Cesar Sandino -- allied the country with the Soviet Union and Cuba. While the Sandinistas enjoyed popular support for having overthrown the Somoza dictatorship, some of this support began to erode because of disenchantment with the new government's harsh, imposing rule. Some of those who were growing angry with the Sandinistas had fought with them in the struggle against the Somoza regime. Now, they were picking up their weapons again and returning to the mountains, only this time to fight against the new dictatorship.
In the United States, the election of President Ronald Reagan brought to office an administration staunchly opposed to the Nicaraguan regime. When the Nicaraguans who grew opposed to the ruling Sandinistas started to form groups of militants, the Reagan Administration saw an opportunity to form an insurgency dedicated to the overthrow of the Sandinistas. This insurgency became known as "the Contras," or counterrevolutionaries.
With U.S. support, the Contra movement grew in size and strength, eventually becoming a serious threat to the regime, if not seriously enough to overthrow it by force, at least serious enough to make its presence known. In response to the increasing pressure for democratic reform, the Sandinistas held elections in 1984 that, unsurprisingly, saw the overwhelming victory of the leader of the Sandinista government, Daniel Ortega. The election, however, was not seen by many international observors as having been "free and fair," given government control of the media and oppression of opposition political parties.
As the military and political struggle increased inside the country, the Sandinistas eventually gave in to pressure and allowed the country's first truly free elections in 1990. The winning candidate, Violeta Chamorro, was the widow of a prominent newspaper publisher who had been assassinated by the Somoza regime for being critical of the dictatorship then ruling the country. Mrs. Chamorro's government enjoyed broad domestic and international legitimacy, and democracy was finally established in Nicaragua.