The 1846 Salvadoran coup attempt occurred in July 1846 when senator FermÃÂn Palacios and bishop Jorge de Viteri y Ungo attempted to depose Salvadoran president Eugenio Aguilar. Palacios became acting president for 10 days after overthrowing Aguilar, but he ceded power back to him when Aguilar and his allies organized a counter-coup.
General Francisco MalespÃÂn, the president of El Salvador, waged a war against Nicaragua from 1844 to 1845. The war was unpopular in El Salvador. In February 1845, after MalespÃÂn returned from Nicaragua, Generals JoaquÃÂn Eufrasio Guzmán and Gerardo Barrios led a coup d'état that deposed MalespÃÂn and exiled him to Honduras. Guzmán became acting president after the coup and completed MalespÃÂn's two-year presidential term in 1846.
On 1 February 1846, FermÃÂn Palacios, a senator, became acting president while the Legislative Assembly elected El Salvador's next president. After three weeks, the legislature elected liberal Eugenio Aguilar for a two-year term and he assumed office on 21 February. During Aguilar's presidency, he feuded with Jorge de Viteri y Ungo, the bishop of San Salvador. Viteri, an ally of MalespÃÂn, called on the Salvadoran people to rebel against Aguilar. Aguilar asked Pope Gregory XVI to reassign Viteri to a bishopric in Nicaragua.
On 12 July 1846, military officers who opposed Aguilar led a coup against him and installed Palacios as acing president. Palacios declared a state of siege. Aguilar, surprised by the coup, organized with his allies to regain power. José MarÃÂa San MartÃÂn, a prominent politician in San Salvador (El Salvador's capital city), contacted Doroteo Vasconcelos, the governor of San Vicente, to send letters to allies in Cuscatlán and San Miguel to rally soldiers to retake power.
After a few days, those who received Vasconcelos' letters affirmed their allegiance to Aguilar and confirmed they were prepared to restore him as president. On 21 July, Aguilar launched a counter-coup. Palacios surrendered power back to Aguilar, restoring him as president. Viteri fled El Salvador to Honduras after the counter-coup, and on 29 July, Aguilar issued a decree that prohibited Viteri from returning. Aguilar's restoration led to MalespÃÂn's launching an invasion of El Salvador from Honduras in November, but Barrios repelled the invasion and MalespÃÂn was killed in action.
Aguilar served out the rest of his two-year term after being restored to the presidency. In 1848, he was succeeded as president by Vasconcelos who served until his overthrow in 1851 by Guatemalan president Rafael Carrera.