Cochrane became a Chilean citizen, on 11 December 1818 at the request of Chilean leader Bernardo O'Higgins. He was appointed Vice Admiral and took command of the Chilean Navy in Chile's war of independence against Spain. He was the first Vice Admiral of Chile. Cochrane reorganised the Chilean navy with British commanders, introducing British naval customs and, formally, English-speaking governance in their warships. He took command in the frigate and blockaded and raided the coasts of Peru, as he had those of France and Spain. On his own initiative, he organised and led the capture of Valdivia, despite only having 300 men and two ships to deploy against seven large forts. He failed in his attempt to capture the Chiloé Archipelago for Chile.