At 1853, Cabañas appointed Jose Francisco Barrundia, Minister Plenipotentiary in Washington. During this year, were constants the harassment of the President of Guatemala, General Rafael Carrera to General Cabañas. Thus, Cabañas deposited the presidency to General Francisco Gómez during the period from 9 May to 31 December 1853, to personally lead the military campaign against Guatemala, and installed in Gracias his headquarters. He returned to the presidency on 1 January 1854 and faced difficult political conditions. On July to this year, he sent a military column to Nicaragua under the leadership of General Francisco Gomez, who died attacked by cholera on 25 July 1854, without achieve the objectives to impose the supporters of the old Federation. Due to attempts of Cabañas to restore the Central American Federation and to his conflicts with the conservative Nicaraguan government of Rafael Carrera, he declared that his aim in Honduras was to overthrow to General José Trinidad Cabañas, which achieved backing the Honduran conservatives, who, led by General Juan Lopez, invaded the nation and defeated to Cabañas on the Battle of Masaguara, in the plains of Santa Rosa and Gracias on 6 October 1855, forcing him to resign the presidency and take refuge in El Salvador. General Juan López called the Vice-President José Santiago Bueso to hold the presidency of the Executive, on 18 October of same year. In El Salvador, Cabañas became both a Minister in the government and head of the National Congress. Cabañas traveled to Nicaragua to seek support to regain the Honduran presidency to the Nicaraguan president Patricio Rivas, who didn't give him for alleged influences of adventurer William Walker. So he returned to El Salvador, where he lived for many years and served as minister and civil and military governor of San Miguel in the government of his friend Gerardo Barrios (1858–1863). During the last years of his life, General Cabañas retired from politic and could return to Honduras at 1867 and settled in Comayagua. In Honduras, he began a campaign against the presence of William Walker in Central America, then was appointed by the administration of President José María Medina as quartermaster of the Customs of Trujillo, Honduras. Cabañas died on 8 January 1871, at age 65. After his death, The Government of Honduras awarded him the title of "Soldier of the motherland" and the Republic of El Salvador named "Cabañas Department" in his honor.