Sandino returned to Nicaragua in 1926 and worked at a gold mine owned by a United States company. Sandino, who lectured the mine workers about social inequalities and the need to change the political system, soon organized his own army, consisting mostly of peasants and workers, and joined the liberals fighting against the conservative government.
A general election was due to held in 1926. 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. Anastasio Somoza became the leader of this National Guard.
Sandino refused to sign the peace treaty and resumed his battle against the United States Marines. 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 Marines 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 President Sacasa, Anastasio Somoza gave orders for Sandino's assassination. On 21st February, 1934, while leaving the presidential palace, 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.