The Chilean Navy () is the naval warfare service branch of the Chilean Armed Forces. It is under the Ministry of National Defense. Its headquarters are at Edificio Armada de Chile, Valparaiso. History Origins and the Wars of Independence (1817–1830) The origins of the Chilean Navy date back to 1817, when General Bernardo O'Higgins prophetically declared after the Chilean victory at the Battle of Chacabuco that a hundred such victories would count for nothing if Chile did not gain control of the sea. This led to the development of the Chilean Navy, and the first legal resolutions outlining the organization of the institution were created. Chile's First National Fleet and the Academy for Young Midshipmen, which was the predecessor of the current Naval Academy, were founded, as well as the Marine Corps and the Supply Commissary. The first commander of the Chilean Navy was Manuel Blanco Encalada. Famous British naval commander Lord Cochrane, who formerly had been a captain in the British royal navy, was hired by Chileans to organize and command their Navy. Cochrane recruited an almost all-anglophone complement of officers and midshipmen and crews of British, Irish, and American seamen. He became a key figure in the war against loyalist forces in Peru, and was instrumental in taking control of the fortresses of Valdivia, though he failed in his attempt to conquer Chiloé Island. In March 1824, the Chilean Navy and Army undertook an expedition to expel the Spanish from Chiloé Archipelago. An expedition was dispatched to Chiloé Island, but it ended in failure when the Chilean Army led by Jorge Beauchef was defeated at the Battle of Mocopulli. Only after Ramón Freire's Chiloé expedition in 1826 did the royalist forces at Chiloé, under the command of Antonio de Quintanilla, surrender and Chiloé joined the new Chilean nation. Age of exploration, territorial expansion, and wars (1830–1885) After the wars of independence, a series of conflicts demonstrated the importance of the navy to the nation. First of these conflicts were the War of the Confederation (1836–1839), the Chincha Islands War (1864–1866), and the War of the Pacific (1879–1883). The founding of Fuerte Bulnes in the Strait of Magellan marked the starting point of a series of Chilean Navy explorations, led by navy hydrographers, such as Francisco Vidal Gormaz and Francisco Hudson, in the unknown zone between the Strait of Magellan and Chiloé. To deal with this new area of