In their zeal to “defend the revolution at all costs,” Sandinista leaders ran into opposition from all sides—from the business community (headed by the business organization COSEP and future president Enrique Bolaños); from Somoza’s former cronies who missed their days of wealth and privilege and were enraged by the policy of confiscation; from the former members of the National Guard, many of whom regrouped outside of Nicaragua  and became the nucleus of the military contra-revolucionarios (Contras); and lastly, from the United States government under President Reagan, which remained deeply distrustful of the Sandinistan Communist tendencies.
The Sandinistas openly collaborated with Cuba  and the Soviet Union and supported El Salvador’s FMLN, a similar revolutionary group, three policies that led the United States to impose an economic embargo in 1985.
Many moderate Nicaraguans supported the U.S. government intervention. They had supported overthrowing the dictator, not the establishment of a repressive Marxist-Leninist economy. Furthermore, land confiscation didn’t end with Somoza’s land; the Sandinistas confiscated the land of any Nicaraguan that opposed them. To moderate Nicaraguans, the FSLN had simply imposed themselves as a new elite.
Negligent Sandinista economic mismanagement and the embargo hastened economic collapse. By 1985, export earnings were half the pre-revolution figures, and much of the confiscated agricultural land remained unproductive in cooperatives. The business class recoiled in fear of further expropriation, and skilled laborers fled the country in search of profitable employment elsewhere.
In order to combat the Contras, the Sandinistas increased military spending and sent much of the country’s productive labor force into battle. Austerity measures didn’t earn the Sandinista government many friends either, as previously common goods, like toothpaste and rice, were parsimoniously rationed and shoddy Eastern-bloc goods replaced imports of better quality.
Finally, to counter the increasingly violent Contra attacks in Matagalpa, Jinotega, and much of the east, the Sandinistas instituted a much despised obligatory draft, forcing Nicaraguans to defend—with their sons’ lives—a revolution in which they were rapidly losing faith. Servicio militar patriotico (patriotic military service), or SMP, was parodied by young men as Seremos muertos pronto (soon we will be dead).
Regardless, in 1984 the Sandinistas easily won an election international observers declared fair and transparent while the economy spiralled and the military conflict grew bloodier. Washington continued to fund the Contras, and Cuba and the Soviet Union continued to fund the Sandinistas, in a proxy war that made Nicaragua a geopolitical pawn.
At the close of the 1980s, both the Contras and the Sandinista government were physically and economically exhausted. The collapse of the Soviet Union left the Sandinistas without a sponsor, while the Contras had little real hope of a military victory. The Iran-Contra scandal in the United States exposed the illegal mechanisms President Reagan’s team were employing to fund their Contra “Freedom Fighters” and torpedoed the Contras’ funding source. The moment was propitious for Costa Rican president Oscar Arías to propose a peace initiative.
In 1987, five Central American presidents attended talks at Esquipulas, Guatemala, and emerged with a radical peace accord. The Sandinistas organized elections in 1990 to show the world that their government was committed to democratic principles and to give Nicaraguans the chance to reaffirm their support for the FSLN. To their surprise, the Nicaraguan people overwhelmingly voted them out of office. The revolution had ended.
If Nicaragua was going to revert to capitalism, the Sandinista elite wanted to ensure they got their share, so on their way out the door, the Sandinistas signed over hundreds of millions of dollars of state property to themselves in a hypocritical disgrace now known as the Piñata. FSLN party heads privatized many state companies under anonymous cooperatives and passed a series of decrees ensuring they would retain some power—and the new bourgeoisie of former bourgeoisie-haters was born.