The government of Cuba assisted Nicaragua's Sandinista National Liberation Front (FSLN) both before and after they took power in 1979. This was prompted by their shared Marxist ideologies and resistance to the policies of the United States government. Pre-revolution Beginning in 1967, the Cuban Dirección de Inteligencia (DGI) had begun to establish ties with various Nicaraguan revolutionary organizations. By 1970 the DGI had managed to train hundreds of Sandinista guerrilla leaders and had a strong influence over the organization. In 1969 the DGI had financed and organized an operation to free the jailed Sandinista leader Carlos Fonseca from his prison in Costa Rica. Fonseca was re-captured shortly after the jail break, but after a plane carrying executives from the United Fruit Company was hijacked by the FSLN, he was again freed and allowed to travel to Cuba. DGI chief Manuel "Redbeard" Piñeiro commented that "of all the countries in Latin America, the most active work being carried out by us is in Nicaragua." After the successful ouster of the right-wing Somoza dictatorship, DGI involvement in the new Sandinista government expanded rapidly. An early indication of the central role that the DGI would play in the Cuban-Nicaraguan relationship was a meeting in Havana on July 27, 1979, at which diplomatic ties between the two countries were re-established after more than 25 years. Julián López Díaz, a prominent DGI agent, was named Cuban Ambassador to Nicaragua. Cuban military and DGI advisors, initially brought in during the Sandinista insurgency, would swell to over 2,500 and operated with all levels of the new Nicaraguan government. While the Cubans would like to have helped more in the development of Nicaragua towards socialism, it was difficult to counter the United States' power and influence in the rest of Central America and the assistance they gave to the Contras. Following the more overt US invasion of Grenada, countries previously looking for support from Cuba saw that the United States government was likely to take violent action to punish this. Post-revolution The early years of the Nicaraguan Revolution were strongly influenced by Cuba. The Sandinista leaders acknowledged that the FSLN owed a great debt to the communist island. The relationship was made possible because of Cuba's commitment to the strategy of revolutionary guerrilla warfare. Once the Sandinistas assumed power, Cuba gave Nicaragua military advice, as well as aid in education, health care, vocational training and industry building for