Nicaragua was discovered by the Spanish in 1522 and was under colonial control until it achieved its independence by revolution in 1838.

In the 19th century most people worked on the land. The principal crops were coffee, sugar cane, beans, rice, cocoa, tobacco, corn, bananas and cotton. Nicaragua also exported gold, silver and lumber.

In 1909 the United States Marines invaded Nicaragua. After elections in 1924 the marines were withdrawn. Two years later, a new general election was held. Fearing a left-wing victory, the United States sent troops, who landed on the Caribbean coast in May 1926, ostensibly to protect United States citizens and property. A civil war now broke out and General José María Moncada emerged as the leader of those fighting for an independent Nicaragua.

In April 1927, the United States sent Henry L. Stimson to mediate the civil war. The following month Moncada agreed to a plan in which both sides - the government and Moncada's forces - would disarm. In addition, a new military force, the Nicaraguan National Guard, would be established under United States supervision. This accord was known as the Pact of Espino Negro.

Another rebel leader, Augusto Sandino, refused to sign the peace treaty. Sandino now resumed his battle against United States troops. He gained most of his support from the rural areas and although he only had about 300 men his guerrilla war caused significant damage in the Caribbean coast and mining regions. Sandino argued that he would continue the war until American troops left Nicaragua.

The United States troops left Nicaragua in January 1933. Sandino now ended his guerrilla war and began peace talks with President Juan Bautista Sacasa. During their meetings, Sacasa offered Sandino a general amnesty as well as land and safeguards for him and his guerrilla forces. However, Sandino, insisted that the Nicaraguan National Guard be dissolved.

Without consulting the president, Anastasio Somoza gave orders for Sandino's assassination. On 21st February, 1934, while leaving the presidential palace after a dinner with President Sacasa, Augusto Sandino and two of his generals were arrested by National Guard officers acting under Somoza's instructions. They were then taken to the airfield, executed, and buried in unmarked graves. After Sandino's execution, the National Guard launched a new campaign against Sandino's supporters. In less than a month, Sandino's army was totally destroyed.

Somoza and his National Guard forced President Juan Bautista Sacasa to resign in 1937. Sandino established a military dictatorship and forced his opponents into exile. His power from three main sources: the ownership or control of large portions of the Nicaraguan economy, the military support of the National Guard, and his acceptance and support from the United States.

His tyrannical and corrupt rule made him extremely unpopular and there were several attempts to oust him. For protection, he constructed a secure compound within his residence and kept personal bodyguards with him wherever he went. However on 21st September, 1956, while attending a party in León he was assassinated by Rigoberto López Pérez, a twenty-seven-year- old Nicaraguan poet.

Sandino was replaced by his son Luis Somoza Debayle. On his death in 1967, his brother, Anastasio Somoza Debayle, became the next dictator of Nicaragua.

On 23rd December, 1972, a powerful earthquake shook Nicaragua, destroying most of the capital city. The earthquake left approximately 10,000 dead and some 50,000 families homeless. Immediately after the earthquake, the National Guard joined the widespread looting. Afterwards, Somoza was also responsible for the illegal appropriation and mismanagement of international relief aid. By 1974 it was estimated that his personal wealth reached $400 million.

The Sandinista National Liberation Front (FSLN) grew rapidly and on 27th December, 1974, a group of FSLN guerrillas seized the home of a government official and kidnapped a group of important figures close to Anastasio Somoza Debayle. These men were later exchanged for fourteen Sandinista prisoners who were flown to Cuba.

The FSLN's prestige increased after this successful operation. In 1975 Anastasio Somoza Debayle ordered a violent and repressive campaign against the FSLN. It killed a large number of guerrillas including one of its founders, José Carlos Fonseca Amador.

Anastasio Somoza Debayle's regime received a set-back with the election of President Jimmy Carter in the United States. Carter announced he was only willing to provide aid to the government of Nicaragua if it improved its human rights record.

On 10th January, 1978, Pedro Joaquín Chamorro Cardenal, the publisher of the La Prensa newspaper and a strong opponent of the government, was assassinated. Evidence was uncovered that the publisher had been killed by Somoza's son and members of the National Guard. On 23rd January a nationwide strike began and the workers demanded an end to the military dictatorship.

In November 1978 the Organization of American States on Human Rights published a report charging the National Guard with numerous violations of human rights. The report was followed by a United Nations resolution condemning the Nicaraguan government.

Anastasio Somoza Debayle refused to leave office and various organizations, including the Sandinista National Liberation Front, Los Doce, the PLI, and the Popular Social Christian Party formed the National Patriotic Front. In June a provisional government in exile was established in Costa Rica. The FSLN continued its guerrilla activities and it gradually gained control of most of Nicaragua.

On 17th July, 1979, Anastasio Somoza Debayle resigned and fled to the United States. A Junta for National Reconstruction was established and in 1984 FSLN won the elections. The following year Daniel Ortega became president of Nicaragua.

Funded by the United States, the Contra rebels refused to accept the election of Ortega. His government's power also suffered from economic sanctions imposed by President Ronald Reagan. It was later discovered that the United States had attempted to damage the economy by the mining of Nicaragua's harbours.

In the 1990 elections the FSLN lost the elections to the UNO (Union of National Opposition). Ortega was replaced as president by Violeta Chamorro. Ortega left office with the words: "We leave victorious because we Sandinistas have spilled blood and sweat not to cling to government posts, but to bring Latin America a little dignity, a little social justice."

Daniel Ortega and his FSLN also lost the elections in 1996 and 2001.