 While in command of the army he was distinguished for courage and ability, taking part in person in many engagements and skirmishes.Upon the outbreak of war in 1868, Aguilera freed all 500 of his slaves, an illegal action under the Spanish law in effect in Cuba at that time, and joined ranks with many of them to retake the city of Bayamo from the Spanish.Many of his ex-slaves became soldiers and officers in the War of Independence.