The Port Mahon Dockyard was established at Port Mahon, one of the world's deepest natural harbours, in 1708, following orders issued by the Admiralty to Admiral Sir George Byng the Commander-in-Chief of the Mediterranean Squadron. He was instructed to develop the Port of Mahon as a naval base following the capture of Minorca. The dockyard was located on the north side of the harbour, opposite Port Mahon town. In 1756 control of the dockyard was fought over during the Battle of Minorca (1756). During the 1760s naval storehouses were constructed. The dockyard was the Royal Navy's principal Mediterranean base for much of the eighteenth century; however the territory changed hands more than once in that time, before being finally ceded to Spain in 1802.