However, with the start of the civil war among Guatemala, Honduras and El Salvador, Costa Rica enacted the Aprilia Law, allowing itself to remain autonomous until constitutional order was restored.
[2] After Francisco Morazán’s victory in the civil war and despite still having the Aprilia Law in function, Costa Rica makes an election for its seats on the Federal Congress electing Félix Romero Menjíbar and Juan Diego Bonilla Nava as deputies and Marquis Manuel María de Peralta and José Francisco Peralta as senators.
[1] Costa Rica's independence from the Federal Republic is proclaimed by then dictator Braulio Carrillo and his Decree of Basis and Guarantees becomes the de facto Constitution.
Carrillo would negotiate the debt payment with Great Britain (acquired collectively as part of the Federation) to avoid the impending threat of invasion, encouraged the coffee-growing industry and connected Limón Province through a railroad.
[2] Gallegos government was highly unpopular due to his attempts to rule by decree and the chaotic situation, a coup deposed him led by Zamora who then called for a new Constituent Assembly and created the 1847 Constitution.