Since he was a child, he was educated to be a seaman and follow his family tradition (both his grandfather and uncle were seamen). After entering the marines, he became second lieutenant in 1868 and was appointed to Cádiz. Two years later, he was appointed to the Philippines and promoted to lieutenant. In 1872, he took charge of 'Cavite' Arsenal and the marines detachment of 'Isabela' naval station. He returned to Spain in 1874 and took part in the third Carlist War, being promoted to captain when the war was about to be over. In 1876, he was appointed to Cuba. He returned to Spain and was appointed to several cities, being promoted to general brigadier.
He was awarded the Red Cross to the Naval Merit (1872) and the nomination 'Benemérito de la Patria por su actuación en la campaña de Cuba' (1876).