In 1862, the Royal Navy's Pacific Squadron was relocated to Esquimalt harbour from Valparaíso, Chile (where it had used floating storeships rather than built facilities ashore). This increased presence, eventually including storehouses and workshops ashore, would require some form of coastal defence to deter naval attack by a potential enemy. This need was reinforced by the influx of American gold miners during the Fraser River Gold Rush of 1858, and by the armed standoff of U.S. and British forces during the San Juan Islands Pig War of 1859 and continuing tensions associated with that dispute until its resolution in 1871.