Other campaigns followed for Castellanos: the Protest of Baragua and the Little Wars. Between 1883 and 1886, he was Secretary of Sub-Inspection of Infantry and Militia in Havana, after which he returned to Spain upon his wife's death.