 After the independence of Peru (1821), his family returned to Spain and he joined the Spanish navy.He made the corresponding ships of his class and traveled almost the entire planet, arriving in one of them to the Philippines.In 1831 he made the instructional cruise aboard the frigate "Perla", which was at that time the midshipman school ship.