Throughout its history Aberdeen has been one of the main ports in Scotland. After its establishment as a royal burgh during the reign of David I (1124–53) it soon grew to be one of the most important trading centres in Scotland. Its position far north of any of the other larger ports (Dundee, Perth, Edinburgh (Leith) and Berwick) meant that it functioned as the commercial hub of a very large hinterland. But it was never Scotland’s most important port, even though it was the second largest for much of the relevant period. Initially it was surpassed by Berwick, until its capture by the English in 1333 during the Wars of Independence. 1 From the second half of the fourteenth century Edinburgh with its port of Leith would take the lead, gaining a dominant role in the import and export of almost every piece of merchandise.