The United States has an unhappy history of involvement in Nicaraguan internal affairs. In 1909, US Marines landed in Nicaragua to restore order after two American mercenaries had been killed by government forces, and the troops remained there more or less continuously until 1933, suppressing insurrections, training local military and National Guard forces, and propping up a succession of repressive regimes.
One of the people who became close to the American intervention forces was Anastasio Somosa Garcia. He had attended school in Philadelphia and been trained by United States marines. Somoza García, who was fluent in English, had cultivated friends with military, economic, and political influence in the United States. Following the departure of the Marines in 1933, Somosa rapidly gained political influence, and he was elected president in 1936. He and his family ruled the country with an iron hand for the next 40 years. Members of the Somoza family either held the presidency directly, or ruled indirectly by having puppet presidents who could be trusted to do as they were told.
The Somoza regime derived its power from ownership and control of large parts of the Nicaraguan economy, from the military support of the National Guard, and from political and military support from the United States. Unfortunately, the Somoza regime was generally corrupt, incompetent, and abusive of the human rights of the Nicaraguan people. The Somoza family enriched themselves via large investments in land, agricultural exports, manufacturing, transport, and real estate. However, the regime was staunchly pro-US in its public stances and had allowed the CIA free rein to run its covert operations out of Nicaraguan facilities, first in 1954 against the government of Guatemala and then again in the Bay of Pigs operation of 1961. This cooperative attitude on the part of the Nicaraguan government often led the US government to look the other way whenever the excesses and brutalities of the Somoza regime became apparent.
The Nicaraguan air force, the Fuerza Aerea de Nicaragua, was originally formed as an arm of the Guardia Nacional and did not gain official permanent status until 1938. Throughout the late 1940s and 1950s, the FAN operated a collection of F-51D Mustangs, F-47N Thunderbolts, Douglas A-20 Havocs, P-38 Lightnings, and even a couple of B-24 Liberators. The FAN acquired its first Invaders in 1961 when it "inherited" four of the Bay of Pigs B-26Bs that were left behind in Nicaragua by the CIA after the Cuban invasion failed. They were incorporated into the FAN at Las Mercedes Airport at Managua. The planes were given the FAM serials of 400 through 403, but their original USAF serial numbers are unknown. In 1963, two more Invaders were purchased by Nicaragua from the MACO Corporation of Chicago. A third B-26 was delivered by MACO as a spare-parts source. It was upgraded to flying status after one of the Invaders crashed in March of 1967. During 1964-65, at least four of the Nicaraguan B-26s went through the Project Wing Spar upgrade program in Panama.
The Frente Sandinista de Liberacion Nacional (FSLN) was created in 1962 to oppose the Somoza dictatorship. The movement was named in honor of Augusto Cesar Sandino, who had led a guerilla band during the 1930s in a struggle against the Nicaraguan government and United States occupation forces. Due to the corruption and excesses of the Somoza regime, by the early 1970s the Sandinista movement had gained considerable popular support. The B-26s of the FAN flew numerous patrol missions and strikes against Sandinista targets, but these attacks were largely ineffective since the FAN found it extremely difficult to communicate with ground forces about exact target locations. By this time, the B-26s were beginning to show extensive signs of wear and tear and were becoming increasingly expensive to maintain and operate, and from 1974 onward most FAN combat missions were flown by T-28s, Cessna 337s, and T-33As.
By 1976, all the surviving FAN B-26s had been grounded. In 1977, the FAN decided to trade in its four B-26s for some Cessna 172 Skyhawks. This deal was brokered by David Tallichet of Kansas. However, one of the B-26s was found to be non-airworthy and was left behind in Managua.
On July 17, 1979, with fighting taking place in the streets of Managua itself, President Anastasio Somoza Debayle (son of Somoza Garcia) fled the country, and the Sandinista movement gained control of the nation. There is a report that at least one B-26 ended up in service with the Fuerza Aerea Sandinista. It was spotted in a junk heap at Managua in August of 1990.