That same year, he joined the navy in the War of the Confederation on board the corvette "Libertad", which captured the "Socabaya", which was left under his command. After returning to Chile, he was promoted to the rank of captain. Due to his distinguished service in the Battle of Casma, he received a medal from the governor of Chile. He commanded the ketch "Magallanes" in 1846 and the steamer "Cazador" from 1851 to 1856, which sank in one of Chile's worst marine disasters.