Aberdeen’s intriguing pirate past has been revealed by a study of Scotland’s oldest civic records.

Academics at Aberdeen University have been investigating the burgh’s records, which date back to 1317 and are recognised by Unesco for their historical importance.

Delving into court rolls and councils registers, historians say the emerging picture is of a town with significant European influence, despite its small size with only a few thousand people.

However, Aberdeen frequently upset its continental neighbours by turning a blind eye to piracy.

Jackson Armstrong and Andrew Mackillop from Aberdeen University led the study, funded by the Research Institute of Irish and Scottish Studies.

Mr Armstrong said: “The Aberdeen Burgh Records are the earliest and most complete body of surviving records of any Scottish town.

“They contain court documents from as early as 1317, during the reign of King Robert the Bruce, and are then a complete record from 1398 to the present day with the exception of one missing volume.

“They are a unique asset providing a great insight into medieval life in Scotland and particularly in Aberdeen.

“They show that the city ‘outperformed’ on the European stage in terms of its size and that it was recognised by Bruges – one of northern Europe’s foremost medieval cities – not only as a significant trading hub but as one of the ‘great towns’ of Scotland.”

Edda Frankot, the project’s research fellow, said there are many examples of a lenient approach to piracy.

She said the issue may have been greater in Aberdeen because shipwrecks occurred frequently due to the difficulties in navigating around a sandbank close to the entrance of the harbour.

“The archives reveal that in 1445 a merchant of Lübeck appealed to Aberdeen’s provost on behalf of the German merchants at Bruges in Flanders.

“A ship which sailed from Bruges with his cargo had been captured by pirates. It was rumoured its cargo had then been sold in Aberdeen,” she added.

The reputation for a tolerance of piracy even extended to the highest levels of society.

Mr Armstrong said: “A 15th century provost of Aberdeen, Sir Robert Davidson, had a reputation for condoning piracy. In this he had the backing of the admiral of Scotland, Alexander Stewart, the earl of Mar.”