Ferrera joined the guerrerista campaigns of General Francisco Morazán and participated brilliantly in the battles of The Trinidad and Gualcho. In addition, he saw action in the pacification of Olancho. In March 1832, Ferrera faced Vicente Domínguez in Yoro and later in Sonaguera and Trujillo, defeating him in both opportunities.
Due to his bravery on the battlefield, he was promoted by General Morazán.
In October 1838, Ferrera rebelled against the federalist government of Francisco Morazan and fought to make Honduras a free state. On 5 April 1839, he was defeated by General Morazán in the battle of the Spirit Santo in El Salvador.
After that humiliating defeat, Ferrera took refuge in Nicaragua. He was Provisional Chief of State of Honduras (1833–1834) and Constitutional President (1841–1844).
He was re-elected president in 1847, resigning that same year.
Ferrera died in Chalatenango, El Salvador, on 10 April 1851.