such as the Coast Douglas fir meant that Vancouver Island could provide shipbuilding material suitable for spar making in the age of sail. The later discovery of coal on the island and at Vancouver's Coal Harbour, meant that the area could also serve as a useful resource in the age of steam as well. Rear-Admiral Robert Lambert Baynes, aware of the political importance of maintaining British sovereignty amidst the San Juan Boundary Dispute and the British Columbia gold rushes recommended to the Admiralty a move of the station headquarters from Valparaíso to Esquimalt in November 1859. By 1865, Esquimalt was recognized as the base headquarters of the Pacific Station. The move from Valparaíso to Esquimalt helped the Pacific Station avoid involvement in the Chincha Islands War (1864–1866) between Spain, Chile, and Peru. Rear-Admiral de Horsey ordered commanded by Frederick Bedford, against the Nicolás de Piérola-led Huáscar in the Battle of Pacocha on 29 May 1877. In that battle, Shah fired two Whitehead torpedoes at Huáscar, but they missed their mark and Huáscar got away. A graving dock large enough to accommodate the largest ships in the Pacific fleet was commissioned at Esquimalt in 1887. After a period of relaxing tensions meant that British interests in British Columbia were secured, the Station was maintained to counter Russian ambitions in the Pacific. The Station was also crucial in defending British Columbia from the United States in the Alaska Boundary Dispute, during the contemporaneous 1898 Spanish–American War, when the US threatened to forcibly invade and annex British Columbia if its demands over Alaska were not met. By the end of the 19th century, improved communications, the signing of the Anglo-Japanese Alliance and the need to concentrate warships in British waters to counter the developing German High Seas Fleet, meant that the station was closed down at sunset on 1 March 1905. Esquimalt Royal Navy Dockyard was transferred to the Canadian Department of Marine and Fisheries. The Pacific Station's responsibilities were divided between the China, Australia and the North America and West Indies Stations (the latter of which would also become responsible for the western South Atlantic, becoming the America and West Indies station after the First World War, with its Bermuda-based cruisers regularly cruising through the Panama Canal and up the western coast of North America to visit Esquimalt and other locations on the Pacific Coast of Canada). After passage of the Naval