While many Nicaraguans opposed the dictatorship, the Somoza family ruled Nicaragua from 1934 to 1979. In 1961 a small group of Nicaraguans formed a new organization which they named after Sandino, the Sandinista Front of National Liberation, and began a new guerrilla war against the regime. The FSLN won popular support resulting in an urban insurrection that overthrew the Somoza regime in 1979. After the formal unification of the Sandinista guerrillas, heavy fighting broke out all over the country. The FSLN launched its final offensive just as the National Guard began to lose control of many areas of the country.
The FSLN army entered Managua, culminating the Nicaraguan revolution. The fight left 50,000 dead and 150,000 Nicaraguans in exile. A five-member junta entered the Nicaraguan capital the next day and assumed power, reiterating its pledge to work for political pluralism, a mixed economic system, and a nonaligned foreign policy.
The new government inherited a country in ruins, with a stagnant economy and a huge debt. Most Nicaraguans saw the Sandinista victory as an opportunity to create a system free of the political, social, and economic inequalities of the almost universally hated Somoza regime.
Immediately after the revolution, the Sandinistas had the best organized and most experienced military force in the country. To replace the National Guard, the Sandinistas established a new national army, the Sandinista People’s Army, and a police force, the Sandinista Police. The opponents of the Sandinistas made little attempt to develop effective mass organizations that could challenge the well organized and well disciplined Sandinista groups. The FSLN mass organizations were instrumental in consolidating Sandinista power over political and military institutions. By 1980, the Sandinistas controlled the government.